Error Correction Coding

Error correction codewords allow QR code readers to detect and correct errors in QR codes. This page explains how to create these error correction codewords after encoding the data.

Step 1: Break Data Codewords into Blocks if Necessary

Before generating error correction codewords, it may be necessary to break up the data codewords into smaller blocks if the QR code is larger than version 2. As an example, if creating a 5-Q QR code, the error correction table says that a 5-Q code has 62 data codewords (strings of 8-bit binary numbers). For example:

(codeword #1) 01000011
(codeword #2) 01010101
(codeword #3) 01000110
(codeword #4) 10000110
(codeword #5) 01010111
(codeword #6) 00100110
(codeword #7) 01010101
(codeword #8) 11000010
(codeword #9) 01110111
(codeword #10) 00110010
(codeword #11) 00000110
(codeword #12) 00010010
(codeword #13) 00000110
(codeword #14) 01100111
(codeword #15) 00100110
(codeword #16) 11110110
(codeword #17) 11110110
(codeword #18) 01000010
(codeword #19) 00000111
(codeword #20) 01110110
(codeword #21) 10000110
(codeword #22) 11110010
(codeword #23) 00000111
(codeword #24) 00100110
(codeword #25) 01010110
(codeword #26) 00010110
(codeword #27) 11000110
(codeword #28) 11000111
(codeword #29) 10010010
(codeword #30) 00000110
(codeword #31) 10110110
(codeword #32) 11100110
(codeword #33) 11110111
(codeword #34) 01110111
(codeword #35) 00110010
(codeword #36) 00000111
(codeword #37) 01110110
(codeword #38) 10000110
(codeword #39) 01010111
(codeword #40) 00100110
(codeword #41) 01010010
(codeword #42) 00000110
(codeword #43) 10000110
(codeword #44) 10010111
(codeword #45) 00110010
(codeword #46) 00000111
(codeword #47) 01000110
(codeword #48) 11110111
(codeword #49) 01110110
(codeword #50) 01010110
(codeword #51) 11000010
(codeword #52) 00000110
(codeword #53) 10010111
(codeword #54) 00110010
(codeword #55) 11100000
(codeword #56) 11101100
(codeword #57) 00010001
(codeword #58) 11101100
(codeword #59) 00010001
(codeword #60) 11101100
(codeword #61) 00010001
(codeword #62) 11101100

The error correction table mentions "group 1" and "group 2", as well as "number of blocks." This means that the data codewords must be split up into up to two groups, and within each group, the data codewords may be further broken up into blocks. The data codewords are broken up sequentially (i.e. starting with codeword 1, then codeword 2, and so on.)

For a 5-Q code, it says that there are two groups, the first of which should be broken up into 2 blocks that each contain 15 data codewords, and the second of which should be broken up into 2 blocks that each contain 16 data codewords. Notice that 15+15+16+16 = 62, which is the total number of data codewords. Below, are the codewords from above, broken up into the correct groups and blocks to illustrate how to do this step.

Group NumberBlock NumberData Codewords in the Group
Group 1Block 1 (codeword #1) 01000011
(codeword #2) 01010101
(codeword #3) 01000110
(codeword #4) 10000110
(codeword #5) 01010111
(codeword #6) 00100110
(codeword #7) 01010101
(codeword #8) 11000010
(codeword #9) 01110111
(codeword #10) 00110010
(codeword #11) 00000110
(codeword #12) 00010010
(codeword #13) 00000110
(codeword #14) 01100111
(codeword #15) 00100110
Block 2(codeword #16) 11110110
(codeword #17) 11110110
(codeword #18) 01000010
(codeword #19) 00000111
(codeword #20) 01110110
(codeword #21) 10000110
(codeword #22) 11110010
(codeword #23) 00000111
(codeword #24) 00100110
(codeword #25) 01010110
(codeword #26) 00010110
(codeword #27) 11000110
(codeword #28) 11000111
(codeword #29) 10010010
(codeword #30) 00000110
Group 2Block 1(codeword #31) 10110110
(codeword #32) 11100110
(codeword #33) 11110111
(codeword #34) 01110111
(codeword #35) 00110010
(codeword #36) 00000111
(codeword #37) 01110110
(codeword #38) 10000110
(codeword #39) 01010111
(codeword #40) 00100110
(codeword #41) 01010010
(codeword #42) 00000110
(codeword #43) 10000110
(codeword #44) 10010111
(codeword #45) 00110010
(codeword #46) 00000111
Block 2(codeword #47) 01000110
(codeword #48) 11110111
(codeword #49) 01110110
(codeword #50) 01010110
(codeword #51) 11000010
(codeword #52) 00000110
(codeword #53) 10010111
(codeword #54) 00110010
(codeword #55) 11100000
(codeword #56) 11101100
(codeword #57) 00010001
(codeword #58) 11101100
(codeword #59) 00010001
(codeword #60) 11101100
(codeword #61) 00010001
(codeword #62) 11101100

In the table, notice that the blocks in group 1 consist of 15 data codewords, and the blocks in group 2 consist of 16 data codewords as specified in the error correction table. Note also that they are broken up sequentially. That is, they are in the same order as they were before being separated into blocks.

The error correction table also says that for a 5-Q code, there are 18 error correction codewords per block. In this example, there are four blocks, so there will be four sets of 18 error correction codewords, for a total of 72 error correction codewords.

As shown in the error correction table, the smaller QR codes do not require the data codewords to be broken up at all, so, for a 1-M code (for example) all 16 data codewords would be used as a single block, and only 10 error correction codewords would need to be generated.

Before continuing the 5-Q example, it is necessary to explain the underlying steps of Reed-Solomon Error correction.

Step 2: Understand Polynomial Long Division

The error correction codewords will be generated using a method called Reed-Solomon Error correction. Part of the process is to perform polynomial long division. That is, dividing one polynomial by another polynomial. This tutorial assumes an understanding of how to do standard long division (i.e. with numbers rather than polyomials) by hand. For more information, read wikiHow's article about how to do long division.

Polynomial long division is slightly more complicated than standard long division. To help clarify the process, here is a simple example of polynomial long division.

This example show 3x2 + x - 1 (the dividend) divided by x + 1 (the divisor). These polynomials are first put into a tableau (see Wikipedia's article on long division for an explanation of this notation).

_____________
x + 1 |3x2 +  x - 1

In each step of the long division, multiply x + 1 by something to make its first term equal that of the polynomial at the bottom of the tableau.

For the first step, 3x2 + x - 1 is at the bottom of the tableau, so multiply x + 1 by 3x. This results in 3x2 + 3x, which has the same first term as that of the polynomial at the bottom of the tableau. Here is the updated tableau.

3x              
x + 1 |3x2 +  x - 1
3x2 + 3x

Now subtract 3x2 + 3x from 3x2 + x - 1. This results in -2x - 1 (because x - 3x is (1 - 3)x, or -2x). The - 1 at the end is carried over from the original polynomial. Here is the updated tableau.

3x              
x + 1 |3x2 +  x - 1
3x2 + 3x
    - 2x - 1

Now, once again, multiply x + 1 by a term that will result in a polynomial whose first term is the same as that of the bottom polynomial. In this case, do -2 (x + 1) to get -2x - 2. Here is the updated tableau.

3x - 2      
x + 1 |3x2 +  x - 1
3x2 + 3x
    - 2x - 1
    - 2x - 2

And now, once again, subtract the two polynomials. The -2x cancels out, but this leaves -1 - 2, which equals 1, as shown in the final tableau below.

3x - 2      
x + 1 |3x2 +  x - 1
3x2 + 3x
    - 2x - 1
    - 2x - 2
           1

The remainder is 1. Technically it is 1x0. It would be necessary to multiply (x + 1) by 1/x to make the first term the same, but since this is a fraction, it means that no further division is possible. The 1 at the bottom of the tableau is the remainder.

Overall, the steps of polynomial long division are:

  1. Find the appropriate term to multiply the divisor by. The result of the multiplication should have the same first term as the the dividend (in the first multiplication step) or remainder (in all subsequent multiplication steps).
  2. Subtract the result from the dividend (in the first multiplication step) or remainder (in all subsequent multiplication steps).
  3. Repeat steps 1 and 2 until it is no longer possible to multiply by an integer, or in other words, it would be necessary to multiply by a fraction. The number at the bottom of the tableau is the remainder.

The polynomial long division necessary for Reed-Solomon Error Correction is simpler in some ways than this example, because it will not be necessary to deal with the exponents of the polynomial terms.

Step 3: Understand The Galois Field

As mentioned in the previous section, to generate error correction codewords, this process uses a method called Reed-Solomon Error correction. Along with polynomial long division, this method uses a Galois field, which is essentially a restricted set of numbers, as well as some mathematical operations that create numbers that are still in that set.

The QR Code standard says to use bit-wise modulo 2 arithmetic and byte-wise modulo 100011101 arithmetic. This means using Galois Field 28, or in other words Galois Field 256, sometimes written as GF(256).

The numbers in GF(256) will all be in the range of 0 through 255 (inclusive). Notice that this is the same range of numbers that can be represented with an eight-bit byte (the largest possible eight-bit byte is 11111111, which equals 255).

This means that all of the mathematical operations in GF(256) will result in numbers that can be represented as eight-bit bytes.

Step 4: Understand Galois Field Arithmetic

As mentioned previously, GF(256) contains the numbers 0 through 255 inclusive. Mathematical operations in GF(256) are cyclical in nature, meaning that if a mathematical operation is performed within GF(256) that results in a number larger than 255, it will be necessary to use the modulo operation to get a number that is still in the Galois Field.

In the Galois Field, negative numbers have the same value as positive numbers, so -n = n. In other words, always use the absolute value of the numbers involved in Galois Field arithmetic.

This means that addition and subtraction within the Galois Field are the same thing. Addition and subtraction in the Galois Field are performed by doing the addition or subtraction as normal, but then performing the modulo operation. And since we are using bit-wise modulo 2 arithmetic (as mentioned in the QR code specification), this is the same as performing the XOR operation. For example:
1 + 1 = 2 % 2 = 0
or
1 ^ 1 = 0

and

0 + 1 = 1 % 2 = 1
or
0 ^ 1 = 1

For the purposes of encoding a QR code, all addition and subtraction in GF(256) is performed by XORing the two numbers together.

Step 5: Generate Powers of 2 using Byte-Wise Modulo 100011101

All of the numbers in GF(256) can be represented as a power of 2. Specifically, all numbers in GF(256) can be represented as 2n, where 0 8 would seem to be too big for the Galois Field since it is equal to 256.

The powers of 2 from 0 to 8 are:
20 = 1
21 = 2
22 = 4
23 = 8
24 = 16
25 = 32
26 = 64
27 = 128
28 = 256

The QR code specification says to use byte-wise modulo 100011101 arithmetic (where 100011101 is a binary number that is equivalent to 285 in decimal). This means that when a number is 256 or larger, it should be XORed with 285. This leads to unexpected values for 28 and larger.

In other words:
28 = 256 ^ 285 = 29

Note that when continuing on to 29, do not take its usual value of 512 and XOR with 285 (which would result in too large a number anyway). Instead, since 29 = 28 * 2, use the value of 28 that was calculated in the previous step.

In other words:
29 = 28 * 2 = 29 * 2 = 58

Continue using the previous power of 2 to create the next powers of 2:
210 = 29 * 2 = 58 * 2 = 116
211 = 210 * 2 = 116 * 2 = 232

Whenever a value greater than or equal to 256 is obtained, once again XOR with 285:
212 = 211 * 2 = 232 * 2 = 464 ^ 285 = 205

In general, the values are always equal to 2 times the previous power, and if that value is 256 or greater, it is XORed with 285.

Using this procedure, all numbers in GF(256) can be represented with 2n, where n is a number in the range 0

Step 6: Understand Multiplication with Logs and Antilogs

Because all of the values can be represented with 2n as explained above, it is possible to logs and antilogs to simplify multiplication in GF(256). (Incidentally, this is what slide rules do, although they are not restricted to GF(256)).

The simplification is possible because, in general (i.e. not just in Galois Fields), one can multiply two numbers p and q with the following operation:
b(logbp + logbq)

In this case, base 2 is in use, so the above operation becomes
2(log2p + log2q)
And the log2x operation tells us how many times to multiply 2 to get an answer of x. In other words, it determines n where 2n = x.

This provides a shortcut for multiplying numbers in GF(256). When multiplying two numbers that have the same base, such as 22 * 28, this is equivalent to adding the two exponents together, like so:

22 * 28 = 2(2 + 8) = 210

This means that since all GF(256) values have been expressed as powers of two (explained in the previous section), all multiplication in GF(256) can be performed as addition of base-2 exponents.

For example, to multiply 16 * 32, this is the same as multiplying 24 by 25. As the previous paragraph explained, this is the same as 2(4 + 5) or 29. The value of 29 was already calculated, therefore in GF(256) with byte-wise modulo 285, 16 * 32 is 29, which was determined in the previous section to be equal to 58.

When adding exponents, if the exponent becomes greater than or equal to 256, simply apply modulo 255. In other words:

2170 * 2164 = 2(170+164) = 2334 → 2334 % 255 = 279.

Therefore, all that is needed to perform multiplication in GF(256) is to generate all the powers of 2. These values have been calculated already and can be found in the log antilog table. The table uses alpha notation, where ɑ = 2. The QR Code specification also uses alpha notation in Annex A.

Step 7: Understanding The Generator Polynomial

We have made a lot of progress toward generating error correction codewords, but we are not quite there yet. The next step is understanding generator polynomials.

As mentioned earlier, error correction coding uses polynomial long division. To do that, two polynomials are needed. The first polynomial to use is called the message polynomial. The message polynomial uses the data codewords from the data encoding step as its coefficients. For example, if the data codewords, converted to integers, were 25, 218, and 35, the message polynomial would be 25x2 + 218x + 35. In practice, real message polynomials for standard QR codes are much longer, but this is just an example.

The message polynomial will be divided by a generator polynomial. The generator polynomial is a polynomial that is created by multiplying
(x - ɑ0) ... (x - ɑn-1)
where n is the number of error correction codewords that must be generated (see the error correction table). As mentioned in the previous section, ɑ (alpha) is equal to 2.

It is possible to programmatically create all the generator polynomials that might be needed. During the process, this tutorial will make use of alpha notation and the log antilog multiplication that was described earlier on this page.

The QR code specification lists generator polynomials in Annex A, starting with 2 and ending with 68. Although standard QR codes will always require more than 2 error correction codewords per block, this page will show how to calculate the generator polynomial for 2 error correction codewords, because it illustrates the process of calculating all the rest of the generator polynomials as well.

Generator Polynomial for 2 Error Correction Codewords

First, multiply (x - ɑ0) and (x - ɑ1).
Since the coefficient of x is 1, and since ɑ0 = 1, this can be written as
0x - ɑ0) * (ɑ0x - ɑ1)

Multiply each term of the first part by each term of the second part to get this:
0x1 * ɑ0x1) + (ɑ0x0 * ɑ0x1) + (ɑ0x1 * ɑ1x0) + (ɑ0x0 * ɑ1x0)

Notice that exponent addition can be used here to perform the multiplications:
(0+0)x(1+1)) + (ɑ(0+0)x(0+1)) + (ɑ(0+1)x(1+0)) + (ɑ(0+1)x(0+0))

The result:
ɑ0x2 + ɑ0x1 + ɑ1x1 + ɑ1x0

Now, combine like terms. There are two x1 terms, so add them together.
ɑ0x2 + (ɑ01)x1 + ɑ1x0

Remember that addition in GF(256) is performed by XOR. Convert the alphas to their integer counterparts using the log antilog table, then perform the XOR.

x2 + (1^2)x1 + 2x0
x2 + 3x1 + 2x0

Back in alpha notation, this is
ɑ0x2 + ɑ25x1 + ɑ1x0
This is the generator polynomial for 2 error correction codewords.

Generator Polynomial for 3 Error Correction Codewords

All the rest of the generator polynomials can be created the same way, using the generator polynomial from each previous step. Start with the previous generator polynomial and multiply it by the next factor, in this case (x - ɑ2)

0x2 + ɑ25x1 + ɑ1x0) * (ɑ0x1 + ɑ2x0)

0x2 * ɑ0x1) + (ɑ25x1 * ɑ0x1) + (ɑ1x0 * ɑ0x1) + (ɑ0x2 * ɑ2x0) + (ɑ25x1 * ɑ2x0) + (ɑ1x0 * ɑ2x0)

To multiply, add the exponents together like this:
(0+0)x(2+1)) + (ɑ(25+0)x(1+1)) + (ɑ(1+0)x(0+1)) + (ɑ(0+2)x(2+0)) + (ɑ(25+2)x(1+0)) + (ɑ(1+2)x(0+0))

After adding the exponents, this is the result:
ɑ0x3 + ɑ25x2 + ɑ1x1 + ɑ2x2 + ɑ27x1 + ɑ3x0

Now combine like terms.
ɑ0x3 + (ɑ25 ^ ɑ2)x2 + (ɑ1 ^ ɑ27)x1 + ɑ3x0

ɑ0x3 + (3 ^ 4)x2 + (2 ^ 12)x1 + ɑ3x0
ɑ0x3 + 7x2 + 14x1 + ɑ3x0
ɑ0x3 + ɑ198x2 + ɑ199x1 + ɑ3x0

This is the generator polynomial for 3 error correction codewords.

When the Exponents are Greater than or Equal to 256

When performing multiplication by adding exponents together, sometimes this may result in an exponent that is greater than or equal to 256. In this case, apply modulo 255 BEFORE combining like terms. For example
ɑ257x4 = ɑ(257 % 255)x4 = ɑ2x4

Other Generator Polynomials

In general, it is possible to create all the generator polynomials g(x) as illustrated below:
(g(x) for 2 error correction codewords) * (x - ɑ2) = (g(x) for 3 error correction codewords)
(g(x) for 3 error correction codewords) * (x - ɑ3) = (g(x) for 4 error correction codewords)
(g(x) for 4 error correction codewords) * (x - ɑ4) = (g(x) for 5 error correction codewords)
...
(g(x) for n-1 error correction codewords) * (x - ɑn-1) = (g(x) for n error correction codewords)

To obtain a specific generator polynomial without having to calculate it programmatically, the generator polynomial tool can create it.

Step 8: Generating Error Correction Codewords

Now it is finally time to start generating error correction codewords. This part uses the data codewords from the HELLO WORLD example on the alphanumeric mode encoding page. These codewords will be used as the coefficients of the message polynomial. This example uses error correction level M, and version 1, to create a 1-M code.

The Message Polynomial

The data encoding step resulted in the following data codewords for HELLO WORLD as a 1-M code.
00100000 01011011 00001011 01111000 11010001 01110010 11011100 01001101 01000011 01000000 11101100 00010001 11101100 00010001 11101100 00010001

Convert those binary numbers into decimal:
32, 91, 11, 120, 209, 114, 220, 77, 67, 64, 236, 17, 236, 17, 236, 17

These numbers are the coefficients of the message polynomial. In other words:
32x15 + 91x14 + 11x13 ... and so on

The Generator Polynomial

First, get the generator polynomial. Since this is a 1-M code, the error correction table says to create 10 error correction codewords. Therefore, use the following generator polynomial:
x10 + ɑ251x9 + ɑ67x8 + ɑ46x7 + ɑ61x6 + ɑ118x5 + ɑ70x4 + ɑ64x3 + ɑ94x2 + ɑ32x + ɑ45

(Refer to the generator polynomial tool and the discussion about generator polynomials earlier on this page.)

The Division Steps

Now it is time to divide the message polynomial by the generator polynomial. This is done in much the same way as the polynomial long division shown earlier on the page. Here are the division steps, updated to take Galois Field arithmetic into account:

  1. Find the appropriate term to multiply the generator polynomial by. The result of the multiplication should have the same first term as the the message polynomial (in the first multiplication step) or remainder (in all subsequent multiplication steps).
  2. XOR the result with the message polynomial (in the first multiplication step) or remainder (in all subsequent multiplication steps).
  3. Perform these steps n times, where n is the number of data codewords.

Notice the differences between these steps and those of normal polynomial long division. Instead of subtracting after the multiplication step, we perform an XOR (which, in GF(256), is the same thing).

More importantly, after dividing the two polynomials, there will be a remainder. The coefficients of this remainder are the error correction codewords.

The division will be illustrated step-by-step in the next section.

Step 9: Divide the Message Polynomial by the Generator Polynomial

The first step to the division is to prepare the message polynomial for the division. The full message polynomial is:

32x15 + 91x14 + 11x13 + 120x12 + 209x11 + 114x10 + 220x9 + 77x8 + 67x7 + 64x6 + 236x5 + 17x4 + 236x3 + 17x2 + 236x1 + 17

To make sure that the exponent of the lead term doesn't become too small during the division, multiply the message polynomial by xn where n is the number of error correction codewords that are needed. In this case n is 10, for 10 error correction codewords, so multiply the message polynomial by x10, which gives us:

32x25 + 91x24 + 11x23 + 120x22 + 209x21 + 114x20 + 220x19 + 77x18 + 67x17 + 64x16 + 236x15 + 17x14 + 236x13 + 17x12 + 236x11 + 17x10

The lead term of the generator polynomial should also have the same exponent, so multiply by x15 to get

ɑ0x25 + ɑ251x24 + ɑ67x23 + ɑ46x22 + ɑ61x21 + ɑ118x20 + ɑ70x19 + ɑ64x18 + ɑ94x17 + ɑ32x16 + ɑ45x15

Now it is possible to perform the repeated division steps. The number of steps in the division must equal the number of terms in the message polynomial. In this case, the division will take 16 steps to complete. This will result in a remainder that has 10 terms. These terms will be the 10 error correction codewords that are required.

Step 1a: Multiply the Generator Polynomial by the Lead Term of the Message Polynomial

The first step is to multiply the generator polynomial by the lead term of the message polynomial. The lead term in this case is 32x25. Since alpha notation makes it easier to perform the multiplication, it is recommended to convert 32x25 to alpha notation. According to the log antilog table, for the integer value 32, the alpha exponent is 5. Therefore 32 = ɑ5. Multiply the generator polynomial by ɑ5:

The exponents of the alphas are added together. In this case, at least one of the exponents is larger than 255, so perform modulo 255 as follows:

ɑ5x25 + ɑ(256 % 255)x24 + ɑ72x23 + ɑ51x22 + ɑ66x21 + ɑ123x20 + ɑ75x19 + ɑ69x18 + ɑ99x17 + ɑ37x16 + ɑ50x15

The result is:

ɑ5x25 + ɑ1x24 + ɑ72x23 + ɑ51x22 + ɑ66x21 + ɑ123x20 + ɑ75x19 + ɑ69x18 + ɑ99x17 + ɑ37x16 + ɑ50x15

Now, convert this to integer notation:

32x25 + 2x24 + 101x23 + 10x22 + 97x21 + 197x20 + 15x19 + 47x18 + 134x17 + 74x16 + 5x15

Step 1b: XOR the result with the message polynomial

Since this is the first division step, XOR the result from 1a with the message polynomial.

(32 ⊕ 32)x25 + (91 ⊕ 2)x24 + (11 ⊕ 101)x23 + (120 ⊕ 10)x22 + (209 ⊕ 97)x21 + (114 ⊕ 197)x20 + (220 ⊕ 15)x19 + (77 ⊕ 47)x18 + (67 ⊕ 134)x17 + (64 ⊕ 74)x16 + (236 ⊕ 5)x15 + (17 ⊕ 0)x14 + (236 ⊕ 0)x13 + (17 ⊕ 0)x12 + (236 ⊕ 0)x11 + (17 ⊕ 0)x10

The result is:

0x25 + 89x24 + 110x23 + 114x22 + 176x21 + 183x20 + 211x19 + 98x18 + 197x17 + 10x16 + 233x15 + 17x14 + 236x13 + 17x12 + 236x11 + 17x10

Discard the lead 0 term to get:

89x24 + 110x23 + 114x22 + 176x21 + 183x20 + 211x19 + 98x18 + 197x17 + 10x16 + 233x15 + 17x14 + 236x13 + 17x12 + 236x11 + 17x10

Step 2a: Multiply the Generator Polynomial by the Lead Term of the XOR result from the previous step

Next, multiply the generator polynomial by the lead term of the XOR result from the previous step. The lead term in this case is 89x24. Convert 89x24 to alpha notation. According to the log antilog table, for the integer value 89, the alpha exponent is 210. Therefore 89 = ɑ210. Multiply the generator polynomial by ɑ210:

210 * ɑ0)x24 + (ɑ210 * ɑ251)x23 + (ɑ210 * ɑ67)x22 + (ɑ210 * ɑ46)x21 + (ɑ210 * ɑ61)x20 + (ɑ210 * ɑ118)x19 + (ɑ210 * ɑ70)x18 + (ɑ210 * ɑ64)x17 + (ɑ210 * ɑ94)x16 + (ɑ210 * ɑ32)x15 + (ɑ210 * ɑ45)x14

The exponents of the alphas are added together. In this case, at least one of the exponents is larger than 255, so perform modulo 255 as follows:

ɑ210x24 + ɑ(461 % 255)x23 + ɑ(277 % 255)x22 + ɑ(256 % 255)x21 + ɑ(271 % 255)x20 + ɑ(328 % 255)x19 + ɑ(280 % 255)x18 + ɑ(274 % 255)x17 + ɑ(304 % 255)x16 + ɑ242x15 + ɑ255x14

The result is:

ɑ210x24 + ɑ206x23 + ɑ22x22 + ɑ1x21 + ɑ16x20 + ɑ73x19 + ɑ25x18 + ɑ19x17 + ɑ49x16 + ɑ242x15 + ɑ0x14

Now, convert this to integer notation:

89x24 + 83x23 + 234x22 + 2x21 + 76x20 + 202x19 + 3x18 + 90x17 + 140x16 + 176x15 + 1x14

Step 2b: XOR the result with the result from step 1b

Use the result from step 1b to perform the next XOR.

(89 ⊕ 89)x24 + (110 ⊕ 83)x23 + (114 ⊕ 234)x22 + (176 ⊕ 2)x21 + (183 ⊕ 76)x20 + (211 ⊕ 202)x19 + (98 ⊕ 3)x18 + (197 ⊕ 90)x17 + (10 ⊕ 140)x16 + (233 ⊕ 176)x15 + (17 ⊕ 1)x14 + (236 ⊕ 0)x13 + (17 ⊕ 0)x12 + (236 ⊕ 0)x11 + (17 ⊕ 0)x10

The result is:

0x24 + 61x23 + 152x22 + 178x21 + 251x20 + 25x19 + 97x18 + 159x17 + 134x16 + 89x15 + 16x14 + 236x13 + 17x12 + 236x11 + 17x10

Discard the lead 0 term to get:

61x23 + 152x22 + 178x21 + 251x20 + 25x19 + 97x18 + 159x17 + 134x16 + 89x15 + 16x14 + 236x13 + 17x12 + 236x11 + 17x10

Step 3a: Multiply the Generator Polynomial by the Lead Term of the XOR result from the previous step

Next, multiply the generator polynomial by the lead term of the XOR result from the previous step. The lead term in this case is 61x23. Convert 61x23 to alpha notation. According to the log antilog table, for the integer value 61, the alpha exponent is 228. Therefore 61 = ɑ228. Multiply the generator polynomial by ɑ228:

228 * ɑ0)x23 + (ɑ228 * ɑ251)x22 + (ɑ228 * ɑ67)x21 + (ɑ228 * ɑ46)x20 + (ɑ228 * ɑ61)x19 + (ɑ228 * ɑ118)x18 + (ɑ228 * ɑ70)x17 + (ɑ228 * ɑ64)x16 + (ɑ228 * ɑ94)x15 + (ɑ228 * ɑ32)x14 + (ɑ228 * ɑ45)x13

The exponents of the alphas are added together. In this case, at least one of the exponents is larger than 255, so perform modulo 255 as follows:

ɑ228x23 + ɑ(479 % 255)x22 + ɑ(295 % 255)x21 + ɑ(274 % 255)x20 + ɑ(289 % 255)x19 + ɑ(346 % 255)x18 + ɑ(298 % 255)x17 + ɑ(292 % 255)x16 + ɑ(322 % 255)x15 + ɑ(260 % 255)x14 + ɑ(273 % 255)x13

The result is:

ɑ228x23 + ɑ224x22 + ɑ40x21 + ɑ19x20 + ɑ34x19 + ɑ91x18 + ɑ43x17 + ɑ37x16 + ɑ67x15 + ɑ5x14 + ɑ18x13

Now, convert this to integer notation:

61x23 + 18x22 + 106x21 + 90x20 + 78x19 + 163x18 + 119x17 + 74x16 + 194x15 + 32x14 + 45x13

Step 3b: XOR the result with the result from step 2b

Use the result from step 2b to perform the next XOR.

(61 ⊕ 61)x23 + (152 ⊕ 18)x22 + (178 ⊕ 106)x21 + (251 ⊕ 90)x20 + (25 ⊕ 78)x19 + (97 ⊕ 163)x18 + (159 ⊕ 119)x17 + (134 ⊕ 74)x16 + (89 ⊕ 194)x15 + (16 ⊕ 32)x14 + (236 ⊕ 45)x13 + (17 ⊕ 0)x12 + (236 ⊕ 0)x11 + (17 ⊕ 0)x10

The result is:

0x23 + 138x22 + 216x21 + 161x20 + 87x19 + 194x18 + 232x17 + 204x16 + 155x15 + 48x14 + 193x13 + 17x12 + 236x11 + 17x10

Discard the lead 0 term to get:

138x22 + 216x21 + 161x20 + 87x19 + 194x18 + 232x17 + 204x16 + 155x15 + 48x14 + 193x13 + 17x12 + 236x11 + 17x10

Step 4a: Multiply the Generator Polynomial by the Lead Term of the XOR result from the previous step

Next, multiply the generator polynomial by the lead term of the XOR result from the previous step. The lead term in this case is 138x22. Convert 138x22 to alpha notation. According to the log antilog table, for the integer value 138, the alpha exponent is 222. Therefore 138 = ɑ222. Multiply the generator polynomial by ɑ222:

222 * ɑ0)x22 + (ɑ222 * ɑ251)x21 + (ɑ222 * ɑ67)x20 + (ɑ222 * ɑ46)x19 + (ɑ222 * ɑ61)x18 + (ɑ222 * ɑ118)x17 + (ɑ222 * ɑ70)x16 + (ɑ222 * ɑ64)x15 + (ɑ222 * ɑ94)x14 + (ɑ222 * ɑ32)x13 + (ɑ222 * ɑ45)x12

The exponents of the alphas are added together. In this case, at least one of the exponents is larger than 255, so perform modulo 255 as follows:

ɑ222x22 + ɑ(473 % 255)x21 + ɑ(289 % 255)x20 + ɑ(268 % 255)x19 + ɑ(283 % 255)x18 + ɑ(340 % 255)x17 + ɑ(292 % 255)x16 + ɑ(286 % 255)x15 + ɑ(316 % 255)x14 + ɑ254x13 + ɑ(267 % 255)x12

The result is:

ɑ222x22 + ɑ218x21 + ɑ34x20 + ɑ13x19 + ɑ28x18 + ɑ85x17 + ɑ37x16 + ɑ31x15 + ɑ61x14 + ɑ254x13 + ɑ12x12

Now, convert this to integer notation:

138x22 + 43x21 + 78x20 + 135x19 + 24x18 + 214x17 + 74x16 + 192x15 + 111x14 + 142x13 + 205x12

Step 4b: XOR the result with the result from step 3b

Use the result from step 3b to perform the next XOR.

(138 ⊕ 138)x22 + (216 ⊕ 43)x21 + (161 ⊕ 78)x20 + (87 ⊕ 135)x19 + (194 ⊕ 24)x18 + (232 ⊕ 214)x17 + (204 ⊕ 74)x16 + (155 ⊕ 192)x15 + (48 ⊕ 111)x14 + (193 ⊕ 142)x13 + (17 ⊕ 205)x12 + (236 ⊕ 0)x11 + (17 ⊕ 0)x10

The result is:

0x22 + 243x21 + 239x20 + 208x19 + 218x18 + 62x17 + 134x16 + 91x15 + 95x14 + 79x13 + 220x12 + 236x11 + 17x10

Discard the lead 0 term to get:

243x21 + 239x20 + 208x19 + 218x18 + 62x17 + 134x16 + 91x15 + 95x14 + 79x13 + 220x12 + 236x11 + 17x10

Step 5a: Multiply the Generator Polynomial by the Lead Term of the XOR result from the previous step

Next, multiply the generator polynomial by the lead term of the XOR result from the previous step. The lead term in this case is 243x21. Convert 243x21 to alpha notation. According to the log antilog table, for the integer value 243, the alpha exponent is 233. Therefore 243 = ɑ233. Multiply the generator polynomial by ɑ233:

233 * ɑ0)x21 + (ɑ233 * ɑ251)x20 + (ɑ233 * ɑ67)x19 + (ɑ233 * ɑ46)x18 + (ɑ233 * ɑ61)x17 + (ɑ233 * ɑ118)x16 + (ɑ233 * ɑ70)x15 + (ɑ233 * ɑ64)x14 + (ɑ233 * ɑ94)x13 + (ɑ233 * ɑ32)x12 + (ɑ233 * ɑ45)x11

The exponents of the alphas are added together. In this case, at least one of the exponents is larger than 255, so perform modulo 255 as follows:

ɑ233x21 + ɑ(484 % 255)x20 + ɑ(300 % 255)x19 + ɑ(279 % 255)x18 + ɑ(294 % 255)x17 + ɑ(351 % 255)x16 + ɑ(303 % 255)x15 + ɑ(297 % 255)x14 + ɑ(327 % 255)x13 + ɑ(265 % 255)x12 + ɑ(278 % 255)x11

The result is:

ɑ233x21 + ɑ229x20 + ɑ45x19 + ɑ24x18 + ɑ39x17 + ɑ96x16 + ɑ48x15 + ɑ42x14 + ɑ72x13 + ɑ10x12 + ɑ23x11

Now, convert this to integer notation:

243x21 + 122x20 + 193x19 + 143x18 + 53x17 + 217x16 + 70x15 + 181x14 + 101x13 + 116x12 + 201x11

Step 5b: XOR the result with the result from step 4b

Use the result from step 4b to perform the next XOR.

(243 ⊕ 243)x21 + (239 ⊕ 122)x20 + (208 ⊕ 193)x19 + (218 ⊕ 143)x18 + (62 ⊕ 53)x17 + (134 ⊕ 217)x16 + (91 ⊕ 70)x15 + (95 ⊕ 181)x14 + (79 ⊕ 101)x13 + (220 ⊕ 116)x12 + (236 ⊕ 201)x11 + (17 ⊕ 0)x10

The result is:

0x21 + 149x20 + 17x19 + 85x18 + 11x17 + 95x16 + 29x15 + 234x14 + 42x13 + 168x12 + 37x11 + 17x10

Discard the lead 0 term to get:

149x20 + 17x19 + 85x18 + 11x17 + 95x16 + 29x15 + 234x14 + 42x13 + 168x12 + 37x11 + 17x10

Step 6a: Multiply the Generator Polynomial by the Lead Term of the XOR result from the previous step

Next, multiply the generator polynomial by the lead term of the XOR result from the previous step. The lead term in this case is 149x20. Convert 149x20 to alpha notation. According to the log antilog table, for the integer value 149, the alpha exponent is 184. Therefore 149 = ɑ184. Multiply the generator polynomial by ɑ184:

184 * ɑ0)x20 + (ɑ184 * ɑ251)x19 + (ɑ184 * ɑ67)x18 + (ɑ184 * ɑ46)x17 + (ɑ184 * ɑ61)x16 + (ɑ184 * ɑ118)x15 + (ɑ184 * ɑ70)x14 + (ɑ184 * ɑ64)x13 + (ɑ184 * ɑ94)x12 + (ɑ184 * ɑ32)x11 + (ɑ184 * ɑ45)x10

The exponents of the alphas are added together. In this case, at least one of the exponents is larger than 255, so perform modulo 255 as follows:

ɑ184x20 + ɑ(435 % 255)x19 + ɑ251x18 + ɑ230x17 + ɑ245x16 + ɑ(302 % 255)x15 + ɑ254x14 + ɑ248x13 + ɑ(278 % 255)x12 + ɑ216x11 + ɑ229x10

The result is:

ɑ184x20 + ɑ180x19 + ɑ251x18 + ɑ230x17 + ɑ245x16 + ɑ47x15 + ɑ254x14 + ɑ248x13 + ɑ23x12 + ɑ216x11 + ɑ229x10

Now, convert this to integer notation:

149x20 + 150x19 + 216x18 + 244x17 + 233x16 + 35x15 + 142x14 + 27x13 + 201x12 + 195x11 + 122x10

Step 6b: XOR the result with the result from step 5b

Use the result from step 5b to perform the next XOR.

(149 ⊕ 149)x20 + (17 ⊕ 150)x19 + (85 ⊕ 216)x18 + (11 ⊕ 244)x17 + (95 ⊕ 233)x16 + (29 ⊕ 35)x15 + (234 ⊕ 142)x14 + (42 ⊕ 27)x13 + (168 ⊕ 201)x12 + (37 ⊕ 195)x11 + (17 ⊕ 122)x10

The result is:

0x20 + 135x19 + 141x18 + 255x17 + 182x16 + 62x15 + 100x14 + 49x13 + 97x12 + 230x11 + 107x10

Discard the lead 0 term to get:

135x19 + 141x18 + 255x17 + 182x16 + 62x15 + 100x14 + 49x13 + 97x12 + 230x11 + 107x10

Step 7a: Multiply the Generator Polynomial by the Lead Term of the XOR result from the previous step

Next, multiply the generator polynomial by the lead term of the XOR result from the previous step. The lead term in this case is 135x19. Convert 135x19 to alpha notation. According to the log antilog table, for the integer value 135, the alpha exponent is 13. Therefore 135 = ɑ13. Multiply the generator polynomial by ɑ13:

13 * ɑ0)x19 + (ɑ13 * ɑ251)x18 + (ɑ13 * ɑ67)x17 + (ɑ13 * ɑ46)x16 + (ɑ13 * ɑ61)x15 + (ɑ13 * ɑ118)x14 + (ɑ13 * ɑ70)x13 + (ɑ13 * ɑ64)x12 + (ɑ13 * ɑ94)x11 + (ɑ13 * ɑ32)x10 + (ɑ13 * ɑ45)x9

The exponents of the alphas are added together. In this case, at least one of the exponents is larger than 255, so perform modulo 255 as follows:

ɑ13x19 + ɑ(264 % 255)x18 + ɑ80x17 + ɑ59x16 + ɑ74x15 + ɑ131x14 + ɑ83x13 + ɑ77x12 + ɑ107x11 + ɑ45x10 + ɑ58x9

The result is:

ɑ13x19 + ɑ9x18 + ɑ80x17 + ɑ59x16 + ɑ74x15 + ɑ131x14 + ɑ83x13 + ɑ77x12 + ɑ107x11 + ɑ45x10 + ɑ58x9

Now, convert this to integer notation:

135x19 + 58x18 + 253x17 + 210x16 + 137x15 + 92x14 + 187x13 + 60x12 + 104x11 + 193x10 + 105x9

Step 7b: XOR the result with the result from step 6b

Use the result from step 6b to perform the next XOR.

(135 ⊕ 135)x19 + (141 ⊕ 58)x18 + (255 ⊕ 253)x17 + (182 ⊕ 210)x16 + (62 ⊕ 137)x15 + (100 ⊕ 92)x14 + (49 ⊕ 187)x13 + (97 ⊕ 60)x12 + (230 ⊕ 104)x11 + (107 ⊕ 193)x10 + (0 ⊕ 105)x9

The result is:

0x19 + 183x18 + 2x17 + 100x16 + 183x15 + 56x14 + 138x13 + 93x12 + 142x11 + 170x10 + 105x9

Discard the lead 0 term to get:

183x18 + 2x17 + 100x16 + 183x15 + 56x14 + 138x13 + 93x12 + 142x11 + 170x10 + 105x9

Step 8a: Multiply the Generator Polynomial by the Lead Term of the XOR result from the previous step

Next, multiply the generator polynomial by the lead term of the XOR result from the previous step. The lead term in this case is 183x18. Convert 183x18 to alpha notation. According to the log antilog table, for the integer value 183, the alpha exponent is 158. Therefore 183 = ɑ158. Multiply the generator polynomial by ɑ158:

158 * ɑ0)x18 + (ɑ158 * ɑ251)x17 + (ɑ158 * ɑ67)x16 + (ɑ158 * ɑ46)x15 + (ɑ158 * ɑ61)x14 + (ɑ158 * ɑ118)x13 + (ɑ158 * ɑ70)x12 + (ɑ158 * ɑ64)x11 + (ɑ158 * ɑ94)x10 + (ɑ158 * ɑ32)x9 + (ɑ158 * ɑ45)x8

The exponents of the alphas are added together. In this case, at least one of the exponents is larger than 255, so perform modulo 255 as follows:

ɑ158x18 + ɑ(409 % 255)x17 + ɑ225x16 + ɑ204x15 + ɑ219x14 + ɑ(276 % 255)x13 + ɑ228x12 + ɑ222x11 + ɑ252x10 + ɑ190x9 + ɑ203x8

The result is:

ɑ158x18 + ɑ154x17 + ɑ225x16 + ɑ204x15 + ɑ219x14 + ɑ21x13 + ɑ228x12 + ɑ222x11 + ɑ252x10 + ɑ190x9 + ɑ203x8

Now, convert this to integer notation:

183x18 + 57x17 + 36x16 + 221x15 + 86x14 + 117x13 + 61x12 + 138x11 + 173x10 + 174x9 + 224x8

Step 8b: XOR the result with the result from step 7b

Use the result from step 7b to perform the next XOR.

(183 ⊕ 183)x18 + (2 ⊕ 57)x17 + (100 ⊕ 36)x16 + (183 ⊕ 221)x15 + (56 ⊕ 86)x14 + (138 ⊕ 117)x13 + (93 ⊕ 61)x12 + (142 ⊕ 138)x11 + (170 ⊕ 173)x10 + (105 ⊕ 174)x9 + (0 ⊕ 224)x8

The result is:

0x18 + 59x17 + 64x16 + 106x15 + 110x14 + 255x13 + 96x12 + 4x11 + 7x10 + 199x9 + 224x8

Discard the lead 0 term to get:

59x17 + 64x16 + 106x15 + 110x14 + 255x13 + 96x12 + 4x11 + 7x10 + 199x9 + 224x8

Step 9a: Multiply the Generator Polynomial by the Lead Term of the XOR result from the previous step

Next, multiply the generator polynomial by the lead term of the XOR result from the previous step. The lead term in this case is 59x17. Convert 59x17 to alpha notation. According to the log antilog table, for the integer value 59, the alpha exponent is 120. Therefore 59 = ɑ120. Multiply the generator polynomial by ɑ120:

120 * ɑ0)x17 + (ɑ120 * ɑ251)x16 + (ɑ120 * ɑ67)x15 + (ɑ120 * ɑ46)x14 + (ɑ120 * ɑ61)x13 + (ɑ120 * ɑ118)x12 + (ɑ120 * ɑ70)x11 + (ɑ120 * ɑ64)x10 + (ɑ120 * ɑ94)x9 + (ɑ120 * ɑ32)x8 + (ɑ120 * ɑ45)x7

The exponents of the alphas are added together. In this case, at least one of the exponents is larger than 255, so perform modulo 255 as follows:

ɑ120x17 + ɑ(371 % 255)x16 + ɑ187x15 + ɑ166x14 + ɑ181x13 + ɑ238x12 + ɑ190x11 + ɑ184x10 + ɑ214x9 + ɑ152x8 + ɑ165x7

The result is:

ɑ120x17 + ɑ116x16 + ɑ187x15 + ɑ166x14 + ɑ181x13 + ɑ238x12 + ɑ190x11 + ɑ184x10 + ɑ214x9 + ɑ152x8 + ɑ165x7

Now, convert this to integer notation:

59x17 + 248x16 + 220x15 + 63x14 + 49x13 + 11x12 + 174x11 + 149x10 + 249x9 + 73x8 + 145x7

Step 9b: XOR the result with the result from step 8b

Use the result from step 8b to perform the next XOR.

(59 ⊕ 59)x17 + (64 ⊕ 248)x16 + (106 ⊕ 220)x15 + (110 ⊕ 63)x14 + (255 ⊕ 49)x13 + (96 ⊕ 11)x12 + (4 ⊕ 174)x11 + (7 ⊕ 149)x10 + (199 ⊕ 249)x9 + (224 ⊕ 73)x8 + (0 ⊕ 145)x7

The result is:

0x17 + 184x16 + 182x15 + 81x14 + 206x13 + 107x12 + 170x11 + 146x10 + 62x9 + 169x8 + 145x7

Discard the lead 0 term to get:

184x16 + 182x15 + 81x14 + 206x13 + 107x12 + 170x11 + 146x10 + 62x9 + 169x8 + 145x7

Step 10a: Multiply the Generator Polynomial by the Lead Term of the XOR result from the previous step

Next, multiply the generator polynomial by the lead term of the XOR result from the previous step. The lead term in this case is 184x16. Convert 184x16 to alpha notation. According to the log antilog table, for the integer value 184, the alpha exponent is 132. Therefore 184 = ɑ132. Multiply the generator polynomial by ɑ132:

132 * ɑ0)x16 + (ɑ132 * ɑ251)x15 + (ɑ132 * ɑ67)x14 + (ɑ132 * ɑ46)x13 + (ɑ132 * ɑ61)x12 + (ɑ132 * ɑ118)x11 + (ɑ132 * ɑ70)x10 + (ɑ132 * ɑ64)x9 + (ɑ132 * ɑ94)x8 + (ɑ132 * ɑ32)x7 + (ɑ132 * ɑ45)x6

The exponents of the alphas are added together. In this case, at least one of the exponents is larger than 255, so perform modulo 255 as follows:

ɑ132x16 + ɑ(383 % 255)x15 + ɑ199x14 + ɑ178x13 + ɑ193x12 + ɑ250x11 + ɑ202x10 + ɑ196x9 + ɑ226x8 + ɑ164x7 + ɑ177x6

The result is:

ɑ132x16 + ɑ128x15 + ɑ199x14 + ɑ178x13 + ɑ193x12 + ɑ250x11 + ɑ202x10 + ɑ196x9 + ɑ226x8 + ɑ164x7 + ɑ177x6

Now, convert this to integer notation:

184x16 + 133x15 + 14x14 + 171x13 + 25x12 + 108x11 + 112x10 + 200x9 + 72x8 + 198x7 + 219x6

Step 10b: XOR the result with the result from step 9b

Use the result from step 9b to perform the next XOR.

(184 ⊕ 184)x16 + (182 ⊕ 133)x15 + (81 ⊕ 14)x14 + (206 ⊕ 171)x13 + (107 ⊕ 25)x12 + (170 ⊕ 108)x11 + (146 ⊕ 112)x10 + (62 ⊕ 200)x9 + (169 ⊕ 72)x8 + (145 ⊕ 198)x7 + (0 ⊕ 219)x6

The result is:

0x16 + 51x15 + 95x14 + 101x13 + 114x12 + 198x11 + 226x10 + 246x9 + 225x8 + 87x7 + 219x6

Discard the lead 0 term to get:

51x15 + 95x14 + 101x13 + 114x12 + 198x11 + 226x10 + 246x9 + 225x8 + 87x7 + 219x6

Step 11a: Multiply the Generator Polynomial by the Lead Term of the XOR result from the previous step

Next, multiply the generator polynomial by the lead term of the XOR result from the previous step. The lead term in this case is 51x15. Convert 51x15 to alpha notation. According to the log antilog table, for the integer value 51, the alpha exponent is 125. Therefore 51 = ɑ125. Multiply the generator polynomial by ɑ125:

125 * ɑ0)x15 + (ɑ125 * ɑ251)x14 + (ɑ125 * ɑ67)x13 + (ɑ125 * ɑ46)x12 + (ɑ125 * ɑ61)x11 + (ɑ125 * ɑ118)x10 + (ɑ125 * ɑ70)x9 + (ɑ125 * ɑ64)x8 + (ɑ125 * ɑ94)x7 + (ɑ125 * ɑ32)x6 + (ɑ125 * ɑ45)x5

The exponents of the alphas are added together. In this case, at least one of the exponents is larger than 255, so perform modulo 255 as follows:

ɑ125x15 + ɑ(376 % 255)x14 + ɑ192x13 + ɑ171x12 + ɑ186x11 + ɑ243x10 + ɑ195x9 + ɑ189x8 + ɑ219x7 + ɑ157x6 + ɑ170x5

The result is:

ɑ125x15 + ɑ121x14 + ɑ192x13 + ɑ171x12 + ɑ186x11 + ɑ243x10 + ɑ195x9 + ɑ189x8 + ɑ219x7 + ɑ157x6 + ɑ170x5

Now, convert this to integer notation:

51x15 + 118x14 + 130x13 + 179x12 + 110x11 + 125x10 + 100x9 + 87x8 + 86x7 + 213x6 + 215x5

Step 11b: XOR the result with the result from step 10b

Use the result from step 10b to perform the next XOR.

(51 ⊕ 51)x15 + (95 ⊕ 118)x14 + (101 ⊕ 130)x13 + (114 ⊕ 179)x12 + (198 ⊕ 110)x11 + (226 ⊕ 125)x10 + (246 ⊕ 100)x9 + (225 ⊕ 87)x8 + (87 ⊕ 86)x7 + (219 ⊕ 213)x6 + (0 ⊕ 215)x5

The result is:

0x15 + 41x14 + 231x13 + 193x12 + 168x11 + 159x10 + 146x9 + 182x8 + 1x7 + 14x6 + 215x5

Discard the lead 0 term to get:

41x14 + 231x13 + 193x12 + 168x11 + 159x10 + 146x9 + 182x8 + 1x7 + 14x6 + 215x5

Step 12a: Multiply the Generator Polynomial by the Lead Term of the XOR result from the previous step

Next, multiply the generator polynomial by the lead term of the XOR result from the previous step. The lead term in this case is 41x14. Convert 41x14 to alpha notation. According to the log antilog table, for the integer value 41, the alpha exponent is 147. Therefore 41 = ɑ147. Multiply the generator polynomial by ɑ147:

147 * ɑ0)x14 + (ɑ147 * ɑ251)x13 + (ɑ147 * ɑ67)x12 + (ɑ147 * ɑ46)x11 + (ɑ147 * ɑ61)x10 + (ɑ147 * ɑ118)x9 + (ɑ147 * ɑ70)x8 + (ɑ147 * ɑ64)x7 + (ɑ147 * ɑ94)x6 + (ɑ147 * ɑ32)x5 + (ɑ147 * ɑ45)x4

The exponents of the alphas are added together. In this case, at least one of the exponents is larger than 255, so perform modulo 255 as follows:

ɑ147x14 + ɑ(398 % 255)x13 + ɑ214x12 + ɑ193x11 + ɑ208x10 + ɑ(265 % 255)x9 + ɑ217x8 + ɑ211x7 + ɑ241x6 + ɑ179x5 + ɑ192x4

The result is:

ɑ147x14 + ɑ143x13 + ɑ214x12 + ɑ193x11 + ɑ208x10 + ɑ10x9 + ɑ217x8 + ɑ211x7 + ɑ241x6 + ɑ179x5 + ɑ192x4

Now, convert this to integer notation:

41x14 + 84x13 + 249x12 + 25x11 + 81x10 + 116x9 + 155x8 + 178x7 + 88x6 + 75x5 + 130x4

Step 12b: XOR the result with the result from step 11b

Use the result from step 11b to perform the next XOR.

(41 ⊕ 41)x14 + (231 ⊕ 84)x13 + (193 ⊕ 249)x12 + (168 ⊕ 25)x11 + (159 ⊕ 81)x10 + (146 ⊕ 116)x9 + (182 ⊕ 155)x8 + (1 ⊕ 178)x7 + (14 ⊕ 88)x6 + (215 ⊕ 75)x5 + (0 ⊕ 130)x4

The result is:

0x14 + 179x13 + 56x12 + 177x11 + 206x10 + 230x9 + 45x8 + 179x7 + 86x6 + 156x5 + 130x4

Discard the lead 0 term to get:

179x13 + 56x12 + 177x11 + 206x10 + 230x9 + 45x8 + 179x7 + 86x6 + 156x5 + 130x4

Step 13a: Multiply the Generator Polynomial by the Lead Term of the XOR result from the previous step

Next, multiply the generator polynomial by the lead term of the XOR result from the previous step. The lead term in this case is 179x13. Convert 179x13 to alpha notation. According to the log antilog table, for the integer value 179, the alpha exponent is 171. Therefore 179 = ɑ171. Multiply the generator polynomial by ɑ171:

171 * ɑ0)x13 + (ɑ171 * ɑ251)x12 + (ɑ171 * ɑ67)x11 + (ɑ171 * ɑ46)x10 + (ɑ171 * ɑ61)x9 + (ɑ171 * ɑ118)x8 + (ɑ171 * ɑ70)x7 + (ɑ171 * ɑ64)x6 + (ɑ171 * ɑ94)x5 + (ɑ171 * ɑ32)x4 + (ɑ171 * ɑ45)x3

The exponents of the alphas are added together. In this case, at least one of the exponents is larger than 255, so perform modulo 255 as follows:

ɑ171x13 + ɑ(422 % 255)x12 + ɑ238x11 + ɑ217x10 + ɑ232x9 + ɑ(289 % 255)x8 + ɑ241x7 + ɑ235x6 + ɑ(265 % 255)x5 + ɑ203x4 + ɑ216x3

The result is:

ɑ171x13 + ɑ167x12 + ɑ238x11 + ɑ217x10 + ɑ232x9 + ɑ34x8 + ɑ241x7 + ɑ235x6 + ɑ10x5 + ɑ203x4 + ɑ216x3

Now, convert this to integer notation:

179x13 + 126x12 + 11x11 + 155x10 + 247x9 + 78x8 + 88x7 + 235x6 + 116x5 + 224x4 + 195x3

Step 13b: XOR the result with the result from step 12b

Use the result from step 12b to perform the next XOR.

(179 ⊕ 179)x13 + (56 ⊕ 126)x12 + (177 ⊕ 11)x11 + (206 ⊕ 155)x10 + (230 ⊕ 247)x9 + (45 ⊕ 78)x8 + (179 ⊕ 88)x7 + (86 ⊕ 235)x6 + (156 ⊕ 116)x5 + (130 ⊕ 224)x4 + (0 ⊕ 195)x3

The result is:

0x13 + 70x12 + 186x11 + 85x10 + 17x9 + 99x8 + 235x7 + 189x6 + 232x5 + 98x4 + 195x3

Discard the lead 0 term to get:

70x12 + 186x11 + 85x10 + 17x9 + 99x8 + 235x7 + 189x6 + 232x5 + 98x4 + 195x3

Step 14a: Multiply the Generator Polynomial by the Lead Term of the XOR result from the previous step

Next, multiply the generator polynomial by the lead term of the XOR result from the previous step. The lead term in this case is 70x12. Convert 70x12 to alpha notation. According to the log antilog table, for the integer value 70, the alpha exponent is 48. Therefore 70 = ɑ48. Multiply the generator polynomial by ɑ48:

48 * ɑ0)x12 + (ɑ48 * ɑ251)x11 + (ɑ48 * ɑ67)x10 + (ɑ48 * ɑ46)x9 + (ɑ48 * ɑ61)x8 + (ɑ48 * ɑ118)x7 + (ɑ48 * ɑ70)x6 + (ɑ48 * ɑ64)x5 + (ɑ48 * ɑ94)x4 + (ɑ48 * ɑ32)x3 + (ɑ48 * ɑ45)x2

The exponents of the alphas are added together. In this case, at least one of the exponents is larger than 255, so perform modulo 255 as follows:

ɑ48x12 + ɑ(299 % 255)x11 + ɑ115x10 + ɑ94x9 + ɑ109x8 + ɑ166x7 + ɑ118x6 + ɑ112x5 + ɑ142x4 + ɑ80x3 + ɑ93x2

The result is:

ɑ48x12 + ɑ44x11 + ɑ115x10 + ɑ94x9 + ɑ109x8 + ɑ166x7 + ɑ118x6 + ɑ112x5 + ɑ142x4 + ɑ80x3 + ɑ93x2

Now, convert this to integer notation:

70x12 + 238x11 + 124x10 + 113x9 + 189x8 + 63x7 + 199x6 + 129x5 + 42x4 + 253x3 + 182x2

Step 14b: XOR the result with the result from step 13b

Use the result from step 13b to perform the next XOR.

(70 ⊕ 70)x12 + (186 ⊕ 238)x11 + (85 ⊕ 124)x10 + (17 ⊕ 113)x9 + (99 ⊕ 189)x8 + (235 ⊕ 63)x7 + (189 ⊕ 199)x6 + (232 ⊕ 129)x5 + (98 ⊕ 42)x4 + (195 ⊕ 253)x3 + (0 ⊕ 182)x2

The result is:

0x12 + 84x11 + 41x10 + 96x9 + 222x8 + 212x7 + 122x6 + 105x5 + 72x4 + 62x3 + 182x2

Discard the lead 0 term to get:

84x11 + 41x10 + 96x9 + 222x8 + 212x7 + 122x6 + 105x5 + 72x4 + 62x3 + 182x2

Step 15a: Multiply the Generator Polynomial by the Lead Term of the XOR result from the previous step

Next, multiply the generator polynomial by the lead term of the XOR result from the previous step. The lead term in this case is 84x11. Convert 84x11 to alpha notation. According to the log antilog table, for the integer value 84, the alpha exponent is 143. Therefore 84 = ɑ143. Multiply the generator polynomial by ɑ143:

143 * ɑ0)x11 + (ɑ143 * ɑ251)x10 + (ɑ143 * ɑ67)x9 + (ɑ143 * ɑ46)x8 + (ɑ143 * ɑ61)x7 + (ɑ143 * ɑ118)x6 + (ɑ143 * ɑ70)x5 + (ɑ143 * ɑ64)x4 + (ɑ143 * ɑ94)x3 + (ɑ143 * ɑ32)x2 + (ɑ143 * ɑ45)x1

The exponents of the alphas are added together. In this case, at least one of the exponents is larger than 255, so perform modulo 255 as follows:

ɑ143x11 + ɑ(394 % 255)x10 + ɑ210x9 + ɑ189x8 + ɑ204x7 + ɑ(261 % 255)x6 + ɑ213x5 + ɑ207x4 + ɑ237x3 + ɑ175x2 + ɑ188x1

The result is:

ɑ143x11 + ɑ139x10 + ɑ210x9 + ɑ189x8 + ɑ204x7 + ɑ6x6 + ɑ213x5 + ɑ207x4 + ɑ237x3 + ɑ175x2 + ɑ188x1

Now, convert this to integer notation:

84x11 + 66x10 + 89x9 + 87x8 + 221x7 + 64x6 + 242x5 + 166x4 + 139x3 + 255x2 + 165x1

Step 15b: XOR the result with the result from step 14b

Use the result from step 14b to perform the next XOR.

(84 ⊕ 84)x11 + (41 ⊕ 66)x10 + (96 ⊕ 89)x9 + (222 ⊕ 87)x8 + (212 ⊕ 221)x7 + (122 ⊕ 64)x6 + (105 ⊕ 242)x5 + (72 ⊕ 166)x4 + (62 ⊕ 139)x3 + (182 ⊕ 255)x2 + (0 ⊕ 165)x1

The result is:

0x11 + 107x10 + 57x9 + 137x8 + 9x7 + 58x6 + 155x5 + 238x4 + 181x3 + 73x2 + 165x1

Discard the lead 0 term to get:

107x10 + 57x9 + 137x8 + 9x7 + 58x6 + 155x5 + 238x4 + 181x3 + 73x2 + 165x1

Step 16a: Multiply the Generator Polynomial by the Lead Term of the XOR result from the previous step

Next, multiply the generator polynomial by the lead term of the XOR result from the previous step. The lead term in this case is 107x10. Convert 107x10 to alpha notation. According to the log antilog table, for the integer value 107, the alpha exponent is 84. Therefore 107 = ɑ84. Multiply the generator polynomial by ɑ84:

84 * ɑ0)x10 + (ɑ84 * ɑ251)x9 + (ɑ84 * ɑ67)x8 + (ɑ84 * ɑ46)x7 + (ɑ84 * ɑ61)x6 + (ɑ84 * ɑ118)x5 + (ɑ84 * ɑ70)x4 + (ɑ84 * ɑ64)x3 + (ɑ84 * ɑ94)x2 + (ɑ84 * ɑ32)x1 + (ɑ84 * ɑ45)x0

The exponents of the alphas are added together. In this case, at least one of the exponents is larger than 255, so perform modulo 255 as follows:

ɑ84x10 + ɑ(335 % 255)x9 + ɑ151x8 + ɑ130x7 + ɑ145x6 + ɑ202x5 + ɑ154x4 + ɑ148x3 + ɑ178x2 + ɑ116x1 + ɑ129x0

The result is:

ɑ84x10 + ɑ80x9 + ɑ151x8 + ɑ130x7 + ɑ145x6 + ɑ202x5 + ɑ154x4 + ɑ148x3 + ɑ178x2 + ɑ116x1 + ɑ129x0

Now, convert this to integer notation:

107x10 + 253x9 + 170x8 + 46x7 + 77x6 + 112x5 + 57x4 + 82x3 + 171x2 + 248x1 + 23

Step 16b: XOR the result with the result from step 15b

Use the result from step 15b to perform the next XOR.

(107 ⊕ 107)x10 + (57 ⊕ 253)x9 + (137 ⊕ 170)x8 + (9 ⊕ 46)x7 + (58 ⊕ 77)x6 + (155 ⊕ 112)x5 + (238 ⊕ 57)x4 + (181 ⊕ 82)x3 + (73 ⊕ 171)x2 + (165 ⊕ 248)x1 + (0 ⊕ 23)x0

The result is:

0x10 + 196x9 + 35x8 + 39x7 + 119x6 + 235x5 + 215x4 + 231x3 + 226x2 + 93x1 + 23

Discard the lead 0 term to get:

196x9 + 35x8 + 39x7 + 119x6 + 235x5 + 215x4 + 231x3 + 226x2 + 93x1 + 23

Use the terms of the remainder as the error correction codewords

The division has been performed 16 times, which is the number of terms in the message polynomial. This means that the division is complete and the terms of the above polynomial are the error correction codewords to use for the original message polynomial:

196  35  39  119  235  215  231  226  93  23

Next: Structure Final Message

The data codewords and error correction codewords have now been generated. For larger QR codes, the QR code specification requires that the codewords be interleaved according to a particular pattern. The next section, structure final message explains the interleaving process.