Example of Simple BCH Error-Correcting Coding
Example of Simple BCH Error-Correcting Coding
Example of Simple BCH Error-Correcting Coding
Problem: Design a 2-error correcting BCH code C of length 13 over the field
GF(27). Find a non-zero code word in C, impose two errors and correct
using an efficient algorithm.
In GF(3) holds
f1 (x) := x + 2,
f2 (x) := x3 + 2x + 2,
f3 (x) := x3 + x2 + 2,
f4 (x) := x3 + x2 + x + 2,
f5 (x) := x3 + 2x2 + 2x + 2.
We will now work in the algebraic field extension of GF(3) such that x13 − 1
is factored into linear polynomials (x − βi ) where βi are primitive roots of
1. Such a field is GF(27).
β 13 = 1. (1)
1
Vojtech@Brtnik.eu BCH Coding April 19, 2010
Furthermore
f3 (β 4 ) = β 12 + β 8 + 2
= (β + 1)4 + β 2 (β + 1)2 + 2
= β 4 + 4β 3 + 2β 2 + 4β + 1 + 4β 2 + β 4 + 2β 3 + β 2 + 2 = 0
f3 (β 12 ) = 0
We can conclude this part stating that f2 has zeros β, β 3 , β 9 ; f3 has zeros
β 4 , β 10 , β 12 ; f4 has zeros β 2 , β 5 , β 6 and finally f5 has zeros β 7 , β 8 and β 11 .
2
Vojtech@Brtnik.eu BCH Coding April 19, 2010
Because C is a cyclic code over GF(3), the generator matrix G can be written
immediately
2 0 0 1 1 0 2 1 2 1 0 0 0
0 2 0 0 1 1 0 2 1 2 1 0 0
G= 0 0 2 0 0 1 1 0 2 1 2 1 0 .
0 0 0 2 0 0 1 1 0 2 1 2 1
1 1 0 0 1 0 0 0 0 0 0 0 0
0 1 1 0 0 1 0 0 0 0 0 0 0
0 0 1 1 0 0 1 0 0 0 0 0 0
2 2 0 1 0 0 0 1 0 0 0 0 0
Hc =
2 1 2 0 0 0 0 0 1 0 0 0 0 .
0 2 1 2 0 0 0 0 0 1 0 0 0
1 1 2 1 0 0 0 0 0 0 1 0 0
2 0 1 2 0 0 0 0 0 0 0 1 0
1 0 0 1 0 0 0 0 0 0 0 0 1
Back to the BCH codes. According to the definition, the parity-check matrix
H of the code C has a form
1 β β 2 β 3 β 4 β 5 β 6 β 7 β 8 β 9 β 10 β 11 β 12
1 β 2 β 4 β 6 β 8 β 10 β 12 β β 3 β 5 β 7 β 9 β 11
H= 1 β 3 β 6 β 9 β 12 β 2 β 5 β 8 β 11 β
.
β 4 β 7 β 10
1 β 4 β 8 β 12 β 3 β 7 β 11 β 2 β 6 β 10 β β5 β9
3
Vojtech@Brtnik.eu BCH Coding April 19, 2010
Length: 13 Dimension: 4
Information symbols: 9 Check symbols: 4
Rate: 9/13 Designed distance: 5
#code words: |F3 |4 = 81 Capable of correcting: 2 errors
4
Vojtech@Brtnik.eu BCH Coding April 19, 2010
This section is written rather briefly, introducing the theory is not the pur-
pose of this paper.
Let us assume that the design distance is d, and that e errors (e ≤ 1/2d)
have occurred when transmitting certain codeword. Let σ(z), ω(z) be poly-
nomials
Y X Y
σ(z) = (1 − β i z) and ω(z) = Ei β i z (1 − β j z),
i i j6=i
where i and j run through the positions of the errors and Ei is the value of
error i. The formal derivative of σ(z) is
X Y
σ 0 (z) = −β i (1 − β j )z.
i
ω(β −i )
Ei = β i ,
σ 0 (β −i )
where we still consider only those i where errors have occurred, or at least
where σ(β −i ) = 0 so in both σ 0 and ω all terms but one disappear.
Now, we get
∞ ∞
ω(z) X Ei β i z X X
ij j
X X
(z) = = = E i β z = zj Ei β ij .
σ(z) 1 − βiz
i i j=1 j=1 i
Because i Ei β ij equals to the inner product of the received word with the
P
jth row of the check matrix, exactly d − 1 coefficients of (z) can be found.
The inner product must be equal to zero for a correct word. Because ω and
σ are at most of degree e and have constant terms 0 and 1, respectively, we
only have 2e ≤ d − 1 unknowns. We find those by solving the equation
ω(z) = σ(z)(z).
5
Vojtech@Brtnik.eu BCH Coding April 19, 2010
In this part, we index elements from zero. The first row of a matrix is thus
in our notation 0th row.
s = (2 0 0 1 1 0 2 1 2 1 0 0 0).
Furthermore assume that during the transition two errors occurred, on po-
sitions 3 and 4, i.e. bits x3 and x4 were changed. We have thus received for
instance the word
s0 = (2 0 0 2 0 0 2 1 2 1 0 0 0).
(β) = β 3 − β 4 = β 3 + 2β 4 = 2β 12
(β 2 ) = β 6 − β 8 = β 6 + 2β 8 = 2β 5
(β 3 ) = β 9 − β 12 = β 9 + 2β 12 = 2β 10
(β 4 ) = β 12 − β 3 = β 12 + 2β 3 = β 6
Using the key equation ω(z) = σ(z) · (z), we will find the error positions
and will be able to correct the transition. Expanding the equation we get
ω1 z + ω2 z 2 = (1 + σ1 z + σ2 z 2 )(2β 12 z + 2β 5 z 2 + 2β 10 z 3 + β 6 z 4 ).
6
Vojtech@Brtnik.eu BCH Coding April 19, 2010
ω1 = 2β 12
ω2 = 2β 5 + 2σ1 β 12
0 = 2β 10 + 2σ1 β 5 + 2σ2 β 12
0 = β 6 + 2σ1 β 10 + 2σ2 β 5 .
σ(z) = 1 + 2β 6 z + β 7 z 2 = (1 − β 3 z)(1 − β 4 z)
σ 0 (z) = 2β 6 + 2β 7 z
ω(z) = 2β 12 z 2
ω(β −i )
Ei = −β i
σ 0 (β −i )
ω(β −3 ) 2β 6 3 β
6
E3 = −β 3 0 −3 = −β 3 6 = −β = β −3
σ (β ) 2β + 2β 4 2β 12
ω(β −4 ) 2β 4 4 β
4
E4 = −β 4 0 −4 = −β 4 6 = −β = 2β −4
σ (β ) 2β + 2β 3 β 12
s00 = (0 0 0 1 2 0 0 0 0 0 0 0 0),
s0 = (2 0 0 2 0 0 2 1 2 1 0 0 0),
we get
s = (2 0 0 1 1 0 2 1 2 1 0 0 0),
exactly what was sent. This concludes the exercise.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: