dot
UNB EE4253 Digital Communications
Department of Electrical and Computer Engineering - University of New Brunswick, Fredericton, NB, Canada
dot

BCH Code Generator

On this page, various polynomials can be chosen to demonstrate the structure of BCH codes capable of correcting several bit errors.



Computations based on P(x) = x3 + x + 1
Given 1011, describing P(x) = x3 + x + 1, then if a is a root:

a3 + a + 1 = 0

a3 = a + 1

Successive terms in aN follow as shown below.


 |  MINIMAL POLYNOMIAL
a0 = a0 = 1 = 1 = 1 = 001 = 1 = a7 = a14 = a21 ...  |  x+1
a1 = a0 × a = (1) × a = a = a = 010 = 2 = a8 = a15 = a22 ...  |  x3+x+1
a2 = a1 × a = (a) × a = a2 = a2 = 100 = 4 = a9 = a16 = a23 ...  |  x3+x+1
a3 = a2 × a = (a2) × a = a3 = a+1 = 011 = 3 = a10 = a17 = a24 ...  |  x3+x2+1
a4 = a3 × a = (a+1) × a = a2+a = a2+a = 110 = 6 = a11 = a18 = a25 ...  |  x3+x+1
a5 = a4 × a = (a2+a) × a = a3+a2 = a2+a+1 = 111 = 7 = a12 = a19 = a26 ...  |  x3+x2+1
a6 = a5 × a = (a2+a+1) × a = a3+a2+a = a2+1 = 101 = 5 = a13 = a20 = a27 ...  |  x3+x2+1

 
a7 = a6 × a = (a2+1) × a = a3+a = 1 = 001 = 1 = a14 = a21 = a28 ...  |  x+1

The polynomial P(x) defines the modulus for multiplication on this set. Each result here represents the remainder when xN is divided by P(x). Click on one of the 3-bit values above to confirm the division result using the polynomial calculator. For any P(x) of order 3, remainders will have 3-bits.

For this P(x) of order 3, a complete set of 23 - 1 = 7 non-zero elements is defined. This choice of P(x) is a primitive polynomial. ( See the factors of P(x) ) The 3-bit terms including [000] describe a Galois field GF(23) generated by P(x).


Minimal Polynomials

The BCH codes are based on the minimal polynomials shown in the above table for each aN. Specifically, BCH codes are constructed on the product of different minimum polynomials drawn from a range of terms in aN.

The minimal polynomial M(x) for a given aN is the smallest polynomial for which M(aN) = 0

For example, in row 4 above, the minimal polynomial for a4 is given as M(x) = x3+x+1 and, for x = a4:

M( a4 ) = (a4)3 + a4 + 1

M( a4 ) = a12 + a4 + 1

M( a4 ) = ( a2+a+1 ) + ( a2+a ) + 1

M( a4 ) = 0, and no smaller polynomials satisfy this condition The terms can be confirmed in the highighted column of the table below showing powers of a4.

Observe that the minimal polynomials for a1 and a2 are the same, and that any even numbered minimal polynomial a2i can be found previously in the list at ai.

For a given P(x) of order 3 and 23 - 1 = 7 unique aN terms, the set of minimal polynomials is found in the factors of the polynomial x7+1 (See the Factors)


Table of Powers aN

Each column contains successive powers of aN raised to the power i. These terms serve to define the generator G(x) for BCH codewords.

Highlighted values in each column correspond to terms defining the minimal polynomial for each aN. These values must add to zero since aN is a root of its minimal polynomial.

ia0ia1ia2ia3ia4ia5ia6i
01111111
11243675
21465237
31354726
41627453
51732564
61576342
71111111

Generator Polynomial G(x) for BCH Code (D=3) based on P(x) = x3+x+1
Using two terms i=(1 .. 2) reduced to one term i=(1)
Terms having duplicate minimal polynomials are not used.

G(x) = x3+x+1

1011

The resulting (7, 4) code can correct at least 1 bit error, as specified. (See the codewords and matrices)
Select a primitive polynomial P(x) and specify the target number of bits to correct t

dot
Sun May 19 00:34:11 ADT 2013
Last Updated: 23 FEB 2010
Richard Tervo [ tervo@unb.ca ] Back to the course homepage...
dot