You are on page 1of 5

Coding Theory Massoud Malek

Bose-Chaudhuri-Hocquengham (BCH) Codes

An important class of multiple-error-correcting linear cyclic codes is the class of BCH


codes. In fact, BCH code is a generalization of the cyclic Hamming codes for multiple-
error correction (recall that Hamming codes correct only one error). Binary BCH codes
were first discovered by A. Hocquenghem in 1959 and independently by R. C. Bose and
D. K. Ray-Chaudhuri in 1960.
These codes are important for two reasons:
I. They admit a relatively easy decoding scheme;
II. the class of BCH codes is quite extensive.
Let f (x) be an irreducible polynomial of degree n over a field IF and let α be a root of
f (x). Then by replacing x in IF [x] mod (f (x)) by α, we obtain the field represented as:

IF [α] = {a0 + a1 α + · · · + an−1 αn−1 : ai ∈ IF } .

Definition. The order of a nonzero element α of a finite field IF , denoted by ord(α), is the
smallest positive integer k such that αk = 1. An element α in a finite field IF of order n is

called a primitive element (or generator) of IF , if IF = 0, α, α2 , . . . , α n−1 = 1 .
Example. Consider the field IF = IK 2 [α], where α is a root of the irreducible polynomial
1 + x + x2 ∈ IK 2 [x]. Then we have: α2 = 1 + α, α3 = α(α + 1) = α2 + α = 1 + α + α = 1. Thus,

IF = {0, , α, 1 + α, , 1} = 0, α, , α2 , , α3 , so α is a primitive element.
Definition. The least common multiple of k non-zero monic polynomials f1 (x), . . . , fk (x)
n
in IK [x], denoted by lcm( f1 (x), . . . , fk (x) ), is the monic polynomial of the lowest degree
which is divisible by all the polynomials f1 (x), . . . , fk (x).
Example. The binary polynomial f (x) = x15 + 1 is divisible by f1 (x) = 1 + x + x2 ,
f2 (x) = 1 + x + x4 , and f3 (x) = (1 + x + x2 )(1 + x3 + x4 ), respectively. Then f (x) is also
divisible by

lcm( f1 (x), f2 (x), f3 (x)) = (1 + x + x2 )(1 + x + x4 )(1 + x3 + x4 ) = 1 + x5 + x10 .

Definition. A minimal polynomial of an element α in a finite field IF of order n is a


non-zero monic polynomial m(x) of the least degree in IF [x] such that m(α) = 0.
Theorem. For any positive integers r and t with t ≤ 2 r−1 − 1, there is a BCH code of length n = 2 r − 1
which is t-correcting and has dimension k ≥ n − r t.

California State University, East Bay


Coding Theory Bose-Chaudhuri-Hocquengham (BCH) Codes Page 2

Let α be a root of the polynomial g(x) = 1 + x + x3 . Now we construct all the powers of x
modulo g(x)
Word P(x) modulo g(x)) Power of b
000 0 −−−
100 1 α0 = 1
010 x α1
001 x2 α2
110 x3 = 1 + x α3
011 x4 = x + x2 α4
111 x5 = x2 + x3 = 1 + x + x2 α5
101 x6 = x + x2 + x3 = 1 + x2 α6
100 x7 = x + x3 = 1 α7

Here is the the parity-check and generator matrices:


1 0 0
 
0 1 0
1 1 0 1 0 0 0
 
0 0 1
 
0 1 1 0 1 0 0
H = 1

1 0,

and G=
1 1 1 0 0 1 0

0 1 1
 
1 0 1 0 0 0 1
1 1 1
 
1 0 1
Notice that we obtained a cyclic Hamming code of length 7.
Corollary. For every integer n ≥ 4, there is a 2-error-correcting BCH code of length n = 2 r − 1,
dimension k = 2 r − 2 r − 1, and distance d = 5 having generator polynomial

g(x) = (1 + x + x4 ) (1 + x + x2 + x3 + x4 ) = 1 + x4 + x6 + x7 + x8 .

The Generator matrix of this [ 15 , 9 , 5 ] BCH code is


1 0 0 0 1 0 1 1 1 0 0 0 0 0 0
 
0 1 0 0 0 1 0 1 1 1 0 0 0 0 0
0 0 1 0 0 0 1 0 1 1 1 0 0 0 0
 
0 0 0 1 0 0 0 1 0 1 1 1 0 0 0
 
G = 0 0 0 0 1 0 0 0 1 0 1 1 1 0 0
 
0 0 0 0 0 1 0 0 0 1 0 1 1 1 0
 
0 0 0 0 0 0 1 0 0 0 1 0 1 1 1
 
1 0 0 0 0 0 0 1 0 0 0 1 0 1 1
 
1 1 0 0 0 0 0 0 1 0 0 0 1 0 1
It is not convenient to obtain a parity-check matrix H of the the above 2-error-correcting
BCH code, with the use of row reductions of the generator matrix G. But note that this
BCH code is cyclic, so we could use the generator of its dual code to produce a parity-
check matrix. By dividing 1 + x 15 by g(x) = 1 + x4 + x6 + x7 + x8 , we obtain the polynomial
p(x) = x7 + x6 + x4 + 1. Hence
h(x) = x7 p(x −1 ) = 1 + x + x3 + x7

California State University, East Bay


Coding Theory Bose-Chaudhuri-Hocquengham (BCH) Codes Page 3

generates the dual code of this BCH code. The generator matrix of the dual code is:
1 1 0 1 0 0 0 1 0 0 0 0 0 0 0
 
0 1 1 0 1 0 0 0 1 0 0 0 0 0 0
0 0 1 1 0 1 0 0 0 1 0 0 0 0 0
 
0 0 0 1 1 0 1 0 0 0 1 0 0 0 0
 
G⊥ = 
0 0 0 0 1 1 0 1 0 0 0 1 0 0 0

0 0 0 0 0 1 1 0 1 0 0 0 1 0 0
 
0 0 0 0 0 0 1 1 0 1 0 0 0 1 0
 
0 0 0 0 0 0 0 1 1 0 1 0 0 0 1
By transposing the matrix G⊥ , we may obtain a parity-check matrix.
We may also use the primitive polynomial h(x) = 1+x+x4 to obtain a parity-check matrix.
The main reason for choosing a primitive polynomial is that we need to make sure that
x i 6= 0, for all i < 2 4 − 1 = 15.
Once all the powers of xk are obtained, we assign to each row of the parity-check matrix,
the binary numbers associated with α and α3 .

Word P(x) modulo h(x) Power of α


0000 0 −−−
1000 1 ∗α0 = 1
0100 x α1
0010 x2 α2
0001 x3 ∗α3
1100 x4 = 1 + x α4
0110 x5 = x + x2 α5
0011 x6 = x2 + x3 ∗α6
1101 x7 = 1 + x + x3 α7
1010 x8 = 1 + x2 α8
0101 x9 = x + x3 ∗α9
1110 x10 = 1 + x + x2 α10
0111 x11 = x + x2 + x3 α11
1111 x12 = 1 + x + x2 + x3 ∗α12
1011 x13 = 1 + x2 + x3 α13
1001 x14 = 1 + x3 α14
1000 x15 = 1 α15

Notice that x15 = x 16−1 = 1, which indicates that h(x) = 1+x+x4 is a primitive polynomial.
Here is how we construct the parity-check matrix:
The first row of the matrix H is obtain from α0 = 1 0 0 0 and α0 = 1 0 0 0. Thus the first row
is H1 = 1 0 0 0 1 0 0 0, but the second row is derived from α = 0 1 0 0 and α3 = 0 0 0 1. Hence
H2 = 0 1 0 0 0 0 0 1, and so on.

California State University, East Bay


Coding Theory Bose-Chaudhuri-Hocquengham (BCH) Codes Page 4

power of α power of α3
 
1 0 0 0 1 0 0 0
 
0 1 0 0 0 0 0 1
 
 
0 0 1 0 0 0 1 1
 
 
0 0 0 1 0 1 0 1
 
 
1 1 0 0 1 1 1 1
 
 
0 1 1 0 1 0 0 0
 
 
0 0 1 1 0 0 0 1
 
H = 1
 
 1 0 1 0 0 1 1
 
1 0 1 0 0 1 0 1
 
 
0 1 0 1 1 1 1 1
 
 
1 1 1 0 1 0 0 0
 
 
0 1 1 1 0 0 0 1
 
 
1 1 1 1 0 0 1 1
 
 
1 0 1 1 0 1 0 1
 
1 0 0 1 1 1 1 1
Using this parity-check matrix simplifies our decoding procedure.
To create BCH codes of length 15, we may use one of the three generator polynomials:
n k d Generator polynomial
15 11 3 g1 (x) = 1 + x + x4
15 7 5 g2 (x) = (1 + x + x4 ) (1 + x + x2 + x3 + x4 )
15 5 7 g3 (x) = (1 + x + x4 ) (1 + x + x2 + x3 + x4 ) (1 + x + x2 )

The [ 15 , 11 , 3 ] BCH code is actually a 1-error-correcting Hamming code. The code may
transmit up to 211 = 2048 different words. Although the [ 15 , 5 , 7 ] BCH is a 3-error-
correcting code, but it could transmit only 25 = 32 different words.
♣ Decoding 2 Error-Correcting BCH Code for IMLD. We describe a decoding scheme for
the 2-error-correcting [ 15 , 9 , 5 ] BCH code using the parity-check matrix H described
above. We shall identify a binary word with the corresponding power of α.
Assume the word w is received, with the syndrome of

w H = w(α) , w(α3 ) = [ s1 , s3 ].
 

Case 1. If s1 = s3 = 0, then no error occurred.


w1 = [ 0 0 0 1 0 0 0 1 0 1 1 1 0 0 0 ] with s1 = [ 0 0 0 0 ] s3 = [ 0 0 0 0 ].

Case 2. If s1 = 0 and s3 6= 0, then ask for retransmission.

California State University, East Bay


Coding Theory Bose-Chaudhuri-Hocquengham (BCH) Codes Page 5

w2 = [ 0 0 1 0 1 0 0 1 0 1 1 1 1 0 0 ] with s1 = [ 0 0 0 0 ] s3 = [ 1 0 1 0 ].
Case 3. If s13 = s3 , then correct a single error at position i, where s1 = αi .
w3 = [ 0 0 1 1 0 1 0 1 0 1 1 1 0 0 0 ] with s1 = [ 0 0 1 0 ] → α2 s3 = [ 0 0 1 1 ] → (α2 )3 = α6 . We have
s13 = s3 , so we conclude that the error occurred at x2 . Hence we correct w3 by changing
its third digit corresponding with x3 , , from one to zero.
Case 4. If s31 and s3 are different, then form the quadratic equation:
 
s3
x2 + s1 x + + s21 = 0.
s1
If the quadratic equation has two distinct roots αi and αj , correct errors at positions i
and j .
Suppose we received the word w4 = [ 1 1 0 1 1 1 1 0 1 0 1 1 0 0 0 ]. The syndrome is

w4 H = [ s1 s3 ], with s1 = [ 0 1 1 1 ] → α11 and s3 = [ 0 1 1 0 ] → α5 .

We have s31 → (α11 )3 = α33 = α3 = [ 0 0 0 1 ] and s3 = [ 0 1 1 0 ] = α5 . Since s31 6= s3 , we


conclude that more than one error occurred.
Using s1 → α11 and s3 → α5 we obtain
 
s3
+ s21 = α5 α(−11) + (α11 )2 = α9 + α7 → [ 0 1 0 1 ] + [ 1 1 0 1 ] = [ 1 0 0 0 ] = α0 .
s1
Trying the elements of GF (24 ) in turn as possible roots, we come to x = α7 and find the
solution of our quadratic equation.

(α7 )2 + α11 α7 + α0 = α14 + α3 + α0 = [ 1 0 0 1] + [ 0 0 0 1 ] + [ 1 0 0 0 ] = [ 0 0 0 0 0 ].

Now α7 ∗αj = 1 = α15 , so αj = α8 is the other root. Therefore we correct errors at positions
i=7 and j = 8; that is
u = [0000001110000000]

is the most likely error pattern. We decode

v = w + u = [110111110011000]

as the word sent.


If the quadratic equation does not have two distinct roots in GF (2r ), conclude that at
least three errors occurred in transmission, and ask for a retransmission.
Exercise. Decode the following received words:
(a) w1 = [ 0 0 0 0 0 0 1 1 0 1 0 0 0 1 0.
(b) w2 = [ 0 1 0 0 1 1 0 1 1 1 0 0 0 0 0.
(c) w3 = [ 1 0 0 0 1 0 1 0 0 0 1 0 1 1 1.

California State University, East Bay

You might also like