Reed Solomon Calculator that shows working



Using data from the error correction example (shown below right): To produce a version 1 of QRCODE with M level error correction, 10 error correction codewords must be added to the 16 data code words (ISO Standard Table 9). The 10th order Generator Polynomial is selected.
gp(x)= α0x10+ α251x9+ α67x8+ α45x7+ α61x6+ α118x5+ α70x4+ α64x3+ α94x2+ α32x1+ α45x0
α is the primitive element on the Galois field GF(28). See Galois Fields Arithmetic.
The binary data codewords are transposed to decimal notation and become the coefficients of a polynomial at the appropriate order.
f(x)=16x25+32x24+12x23+86x22+97x21+128x20+236x19+17x18+236x17+17x16+236x15+ 17x14+236x13+17x12+236x11+17x10+0x9+0x8+ 0x7+0x6+0x5+0x4+0x3+0x2+0x1+0x0
The error correction codewords are derived from the coefficients of the polynomial produced by calculating

f(x) ÷ gp(x)


REED SOLOMON calculator for QRCODE barcode

Quick Response barcode QRCODE is a registered trademark of DENSO WAVE INCORPORATED. The complete specification is published in English as ISO/IEC 18004 International Standard. DENSO owns several patents related to the design but does not require royalty fees. The barcode includes robust recogition features that permit good data to be recovered from ad hoc digital photographs. e.g. QRCODE decoding applets exist for most 3G mobile phone cameras.

Error correction example The QRCODE 2D barcode uses REED SOLOMON algorithm to add error detection and correction information to source data. The data is represented series of values between 0 and 225 (i.e. 8 bit bytes). The encoder add a series of parity bytes. The ISO standard (Annex 1 Symbol Encoding Examples page 94) shows an example of 16*8 bit codewords.
qrcode symbol


00010000 00100000 00001100 01010110 01100001 10000000 11101100 00010001 11101100 00010001 11101100 00010001 11101100 00010001 11101100 00010001

"Using the Reed-Solomon algorithm to produce the required number of codewords"


00010000 00100000 00001100 01010110 01100001 10000000 11101100 00010001 11101100 00010001 11101100 00010001 11101100 00010001 11101100 00010001 10100101 00100100 11010100 11000001 11101101 00110110 11000111 10000111 00101100 01010101

The calculator to the left shows how this operation is performed. To see how these bits are placed see QRCODE barcode layout