Cyclic Codes: EE 430 / Dr. Muqaibel
Cyclic Codes: EE 430 / Dr. Muqaibel
Cyclic Codes: EE 430 / Dr. Muqaibel
1 0 1 1 1
cyclic shift of [10111] is [11011]
C
0 1 1 0 1
C
1 1 0 1 0
Example 3
• It would be much easier if we deal with multiplication, this transform is done using Polynomial
Representation.
Code Polynomial
ax j bx j (a b) x j Where (a+b) and (a.b) are under GF(2). But j+k is integral
(ax j ).(bx k ) (a . b) x j k addition
Example:
m( x ) m0 m1 x m2 x 2
g ( x ) g 0 g1 x
m( x ) g ( x ) (m0 g 0 ) (m1 g1 )x (m2 0)x 2
addition
Let c = c0 c1 c2 …. cn-1
and c(i) = cn-i cn-i+1 c0 …. cn-i-1 (i shifts to the right)
c(X) = c0 + c1X+ c2 X2 + …. + cn-1 Xn-1
c (i)(X) = cn-i + cn-i+1 X + …. + cn-1 Xi-1 + …. +
c0Xi +…. +cn-i-1 Xn-1
What is the relation between c(X) and c (i)(X)?
Apparently, shifting a bit one place to the right is equivalent
to multiplying the term by X.
Xic(X)= c0Xi +c1X i+1 + ….+ cn-i-1 Xn-1 + cn-i Xn ….+ cn-1 Xn+i-1
Input
EE 430 \ Dr. Muqaibel Cyclic Codes 21
Circuit for Multiplying Polynomials (2)
+ + + +
Output
g0 g1 g2 gr-1 gr
Input
EE 430 \ Dr. Muqaibel Cyclic Codes 22
Systematic Cyclic Codes
Example
Consider the (7,4) cyclic code generated by
g(X) = 1 + X + X3. Find the systematic codeword for
the message 1001.
u(X) = 1 + X3
X3u(X) = X3 + X6
b(X) = Rem[X3u(x)/g(X)] = X3u(x) |g(X) = 0 = X3u(x) |X3 = X+1
= X3 (X3 +1) = (1 + X)X = X + X2
Therefore, c = 0111001
Output
g0 g1 g2 gr-1 gr
+ + + +
Input
Gate
g1 g2 gr-1
+ + + +
• Gate ON. k message bits are shifted into the channel. The
parity bits are formed in the register.
• Gate OFF. Contents of register are shifted into the channel.
+ +
Input 1 1 0 1
Register : 000 110 101 100 100
initial 1st shift 2nd shift 3rd shift 4th shift
Codeword: 1 0 0 1 0 1 1
• Xn +1 = g(X)h(X)
• deg[g(x)] = n-k, deg[h(x)] = k
• g(x)h(X) mod (Xn +1) = 0.
• h(X) is called the parity-check polynomial. It plays the rule
of the H matrix for linear codes.
• h(X) is the generator polynomial of an (n,n-k) cyclic code,
which is the dual of the (n,k) code generated by g(X).
• STEPS:
(1) Syndrome computation
(2) Associating the syndrome to the error pattern
(3) Error correction
Gate
r=
0010110 +
+
Gate +
+
r=
0010110
Shift Input Register contents
0 0 0 (initial state)
1 0 000
2 1 100
3 1 110
4 0 011
5 1 011
6 0 111
7 0 1 0 1 (syndrome s)
8 (input gate off) - 1 0 0 (syndrome s (1) )
9 - 0 1 0 (syndrome s (2) )
Let c = 1 0 0 1 0 1 1 and r = 1 0 1 1 0 1 1
i 2 j mod n
constitute a conjugate set.
• Theorem:
If g(X) has l roots (out of it n-k roots) that are consecutive
powers of , then the code it generates has a minimum
distance d = l + 1.
• To design a cyclic code with a guaranteed minimum distance
of d, form g(X) to have d-1 consecutive roots. The parameter
d is called the designed minimum distance of the code.
• Since roots occur in conjugates, the actual number of
consecutive roots, say l, may be greater than d-1. dmin = l + 1
is called the actual minimum distance of the code.
Block length 2m 1
Number of parity - check bits n k mt 0
min imum distance d min 2t 0 1
n k b g(X) (octal)
7 3 2 35 (try to find dmin!)
15 10 2 65
15 9 3 171
31 25 2 161
63 56 2 355
63 55 3 711
511 499 4 10451
1023 1010 4 22365
CRC
CRC Error Correction Error Correction
To
To Syndrome
Encoder Decoder Info Sink
Encoder Transmitter
Checker
number
• where r is the
r
1 2of check bits Code Coverage
• For some near-optima CRC codes, CRC-12 0.999756
see table 5.6.5 CRC-ANSI 0.999985
CRC-32A 0.99999999977
EE 430 \ Dr. Muqaibel Cyclic Codes 53
Simple Modifications to Cyclic Codes
• Expanding (Extending): increasing the length of the code by adding
more parity bits.
– Usually to improve the capability of the code.
– In general, resulting code is not cyclic.
• Shortening: decreasing the number of bits in the code.
– To control the total number of bits in a block…To increase the rate
of the code.
– In general, resulting code is not cyclic.
• Interleaving: improves the burst error-correction capability
– There are many types of interleavers. Consider the Block
interleaver/ de-interleaver
• Try numbers !