Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title:...
Transcript of Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title:...
![Page 1: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/1.jpg)
CYCLIC CODES
Dr. Musbah Shaat EELE 6338 08/10/2012
![Page 2: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/2.jpg)
Outline
EELE 6338 2
![Page 3: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/3.jpg)
Definition
• An (n,k) linear code C is cyclic if every cyclic
shift of a codeword in C is also a codeword in
C.
If c c c …. c c is a codeword, thenIf c0
c1
c2
…. cn-2
cn-1
is a codeword, then
cn-1
c0
c1
…. cn-3
cn-2
cn-2
cn-1
c0
…. cn-4
cn-3
: : : : :
c1
c2
c3
…. cn-1
c0
are also codewords.
3
![Page 4: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/4.jpg)
Example
• The (7,4) Hamming code discussed before is cyclic:
1010001 1110010 0000000 1111111
1101000 01110011101000 0111001
0110100 1011100
0011010 0101110
0001101 0010111
1000110 1001011
0100011 1100101
4
![Page 5: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/5.jpg)
Code Polynomial
• Let c = c0 c1 c2 …. cn-1.
The code polynomial of c:c(X) = c0 + c1X+ c2 X
2 + …. + cn-1 X
n-1
where the power of X corresponds to the bit
position, and the coefficients are 0’s and 1’s.position, and the coefficients are 0’s and 1’s.
• Example:
1010001 ; 1+X2+X6
0101110 ; X+X3+X4+X5
Each codeword is represented by a polynomial of
degree less than or equal n-1.
5
deg[ ]c(X) ≤ −n 1
![Page 6: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/6.jpg)
Implementing the Shift
Let c = c0 c1 c2 …. cn-1
and c(i) = cn-i cn-i+1 … c
n-1 c0 …. cn-i-1 (i shifts to the right)
Then, c(X) = c0 + c1X+ c2 X2 + …. + c
n-1 Xn-1 , and
c (i)(X) = c + c X + …. + c Xi-1 + c Xi +…. +c Xn-1c (i)(X) = cn-i + c
n-i+1 X + …. + cn-1 X
i-1 + c0Xi +…. +cn-i-1 X
n-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. For i shifts:
Xic(X)= c0Xi +c1X i+1 + ….+ cn-i-1 X
n-1 + cn-i X
n ….+ cn-1 X
n+i-1
6
![Page 7: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/7.jpg)
Implementing the Shift (�)
Rearranging,
Xic(X) = cn-i X
n +…+ cn-1 X
n+i-1 + c0Xi + c1X i+1 + …+ cn-i-1 X
n-1
Add to the polynomial the zero-valued sequence:
(cn-i + c
n-i ) + (cn-i+1 + c
n-i+1 )X + …. + (cn-1 + c
n-1 )Xi-1(c
n-i + cn-i ) + (c
n-i+1 + cn-i+1 )X + …. + (c
n-1 + cn-1 )X
i-1
Xic(X) = cn-i (X
n +1) + cn-i+1 X (Xn +1) +…. + c
n-1 Xi-1 (Xn +1) +
cn-i + c
n-i+1 X +…. + cn-1 X
i-1 +
c0Xi +c1X i+1 + …. + cn-i-1 X
n-1
That is: Xic(X) = q(X)(Xn +1) + c(i)(X)
Where q(X)= cn-i + c
n-i+1 X +…. + cn-1 X
i-1
7
![Page 8: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/8.jpg)
Implementing the Shift (�)
c(i)(X) is the remainder from dividing Xic(X) by (Xn +1).
c(i)(X) = Rem[Xic(X)/ (Xn +1)] = Xic(X) mod (Xn +1).
Example: c = 0101110. c(3) = 1100101 Example: c = 0101110. c(3) = 1100101
Mathematically: c(X) = X + X3 + X4 + X5.
X3c(X) = X4 + X6 + X7 + X8
Rem[X3c(X)/ (X7 +1)] = 1 + X + X4 + X6
c(3) = 1100101
8
![Page 9: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/9.jpg)
The Code Polynomial of Minimum Degree
• TH 5.1: The nonzero code polynomial of minimum degree
in a cyclic code C is unique.(If not, the sum of the two polynomials will be a code polynomial of
degree less than the minimum. Contradiction)
• TH 5.2: Let g(X) = g + g X +….+ g Xr-1 +Xr be the nonzero • TH 5.2: Let g(X) = g0 + g1X +….+ gr-1Xr-1 +Xr be the nonzero
code polynomial of minimum degree in an (n,k) cyclic
code. Then the constant term g0 must be equal to 1.(If not, then one cyclic shift to the left (n-1 to right) will produce a
code polynomial of degree less than the minimum. Contradiction)
• For the (7,4) code given in the Table 5.1, the nonzero code
polynomial of minimum degree is g(X) = 1 + X + X3
9
![Page 10: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/10.jpg)
EELE 6338 10
![Page 11: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/11.jpg)
Generator Polynomial
Let g(X), the minimum-degree polynomial in C, have degree r
• Since the code is cyclic: Xg(X), X2g(X),…., Xn-r-1g(X) are code
polynomials in C. (Note that deg[Xn-r-1g(X)] = n-1).
• Since the code is linear: Since the code is linear:
(a0 + a1X + …. + an-r-1 X
n-r-1)g(X) is also a code
polynomial, where ai= 0 or 1.
• TH 5.3: A binary polynomial of degree ≤ n-1 is a code
polynomial if and only if it is a multiple of g(X).(if a code polynomial c(X) is not a multiple of g(X), then Rem[c(X)/g(X)]
will be a code polynomial of
degree less than the minimum. Contradiction)
11
![Page 12: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/12.jpg)
Generator Polynomial (�)
• All code polynomials are generated from the multiplication c(X) = a(X)g(X).
deg[c(X)] n-1, deg[g(X)] = r, ==> deg[a(X)] ≤ n-r-1
There is a total of 2n-r polynomials of degree ≤ n-r-1
Therefore the number of codewords = 2n-r = 2k
≤
Therefore the number of codewords = 2n-r = 2k
Therefore, r = deg[g(X)] = n-k
• Since deg[a(X)] ≤ k-1, the polynomial a(X) may be taken to be the information polynomial u(X) (a polynomial whose coefficients are the information bits). Encoding is performed by the multiplication c(X) = u(X)g(X).
• g(X), generator polynomial, completely defines the code.
12
![Page 13: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/13.jpg)
• TH 5.4:
In an (n,k) cyclic code, there exists one and
only one code polynomial of degree n-k,
1+ g1X + g
2X2 + …+ g
n-k-1Xn-k-1 +Xn-k1+ g
1X + g
2X2 + …+ g
n-k-1Xn-k-1 +Xn-k
Every code polynomial is a multiple of g(X),
and every binary polynomial of degree n-1 or
less that is a multiple of g(X) is a code
polynomial.
13
![Page 14: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/14.jpg)
(7,4) Code Generated by 1+X+X3
Infor. Code Code polynomials
0000 0000000 0 = 0 . g(X)
1000 1101000 1 + X + X3 = 1 . g(X)
0100 0110100 X + X2 + X4 = X . g(X)0100 0110100 X + X + X = X . g(X)
1100 1011100 1 + X2 + X3 + X4 = (1 + X) . g(X)
0010 0011010 X2 + X3 + X5 = X2 . g(X)
1010 1110010 1 + X+ X2 + X5 = (1 + X2) . g(X)
0110 0101110 X+ X3 + X4 + X5 = (X+ X2) . g(X)
1110 1000110 1 + X4 + X5 = (1 + X + X2) . g(X)
0001 0001101 X3 + X4 + X6 = X3 . g(X)
14
![Page 15: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/15.jpg)
(7,4) Code Generated by 1+X+X3 (�)
Infor. Code Code polynomials
1001 1100101 1 + X + X4 + X6 = (1 + X3) . g(X)
0101 0111001 X+ X2 + X3 + X6 = (X+ X3) . g(X)
1101 1010001 1 + X2 + X6 = (1 + X + X3) . g(X)
0011 0010111 X2 + X4 + X5 + X6 = (X2 + X3). g(X)0011 0010111 X2 + X4 + X5 + X6 = (X2 + X3). g(X)
1011 1111111 1 + X + X2 + X3 + X4 + X5 + X6
= (1 + X2 + X3) . g(X)
0111 0100011 X + X5 + X6 = (X + X2 + X3). g(X)
1111 1001011 1 + X3 + X5 + X6
= (1 + X + X2 + X3) . g(X)
15
![Page 16: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/16.jpg)
Properties of the Generator
Polynomial • TH 5.5: The generator polynomial g(X) of an (n,k) cyclic
code is a factor of Xn+1.
• TH 5.6: If g(X) is a polynomial of degree n-k and is a factor
of Xn+1, then it generates an (n,k) cyclic code. of X +1, then it generates an (n,k) cyclic code.
16
![Page 17: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/17.jpg)
Constructing g(X)
(1) To construct a cyclic code of length n, find the factors of
the polynomial Xn+1.
(2) The factor (or product of factors) of degree n-k serves as
the generator polynomial of an (n,k) cyclic code. Clearly, a
cyclic code of length n does not exist for every k.cyclic code of length n does not exist for every k.
(3) The code generated this way is guaranteed to be cyclic.
But we know nothing yet about its minimum distance. The
generated code may be good or bad.
17
![Page 18: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/18.jpg)
Cyclic Codes of Length 7
Example (5.1-mod): What cyclic codes of length 7 can be constructed?
Rembember r=n-k � k=n-r.
X7+1 = (1 + X)(1 + X + X3)(1 + X2 + X3)X +1 = (1 + X)(1 + X + X )(1 + X + X )
g(X) Code g(X) Code
(1 + X) (7,6) (1 + X)(1 + X + X3) (7,3)
(1 + X + X3) (7,4) (1 + X) (1 + X2 + X3) (7,3)
(1 + X2 + X3) (7,4) (1 + X + X3)(1 + X2 + X3) (7,1)
What if u=(1010) � u= 1 + X2 � v(x)= 1 + X + X2 + X5
• � 1110010
18
![Page 19: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/19.jpg)
Encoding of Systematic Cyclic Codes
Systematic: b0 b1 b2 …. bn-k-1 u0 u1 u2 …. u
k-1
b(X) = b0 + b1X+….+bn-k-1Xn-k-1, u(X) = u0+u1X+ ….+u
k-1Xk-1
then c(X) = b(X) + Xn-k u(X)
a(X)g(X) = b(X) + Xn-k u(X)
Xn-k u(X)= a(X)g(X) + b(X)Xn-k u(X)= a(X)g(X) + b(X)
Or b(X) = Rem[Xn-k u(X)/g(X)]
Encoding Procedure:
1. Multiply u(X) by Xn-k
2. Divide Xn-k u(X) by g(X), obtaining the remainder b(X).
3. Add b(X) to Xn-k u(X), obtaining c(X) in systematic form.
19
![Page 20: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/20.jpg)
Encoding of 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 + X3u(X) = 1 + X3
X3u(X) = X3 + X6
b(X) = Rem[X3u(x)/g(X)] = X + X2
Therefore, c = 0111001
20
![Page 21: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/21.jpg)
Generator Matrix of Cyclic Codes
• The generator matrix of a cyclic code can be
formed as follows:
1st row: Coefficients of g(X) followed by k-1
zeroszeros
Other rows are the k-1 cyclic shifts of first row
• The matrix can be arranged in systematic form
by row operations.
21
![Page 22: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/22.jpg)
Generator Matrix of Cyclic Codes (�)
EELE 6338 22
![Page 23: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/23.jpg)
Generator Matrix in Systematic form
EELE 6338 23
![Page 24: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/24.jpg)
Example 5.4
EELE 6338 24
![Page 25: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/25.jpg)
Encoder Circuit
g2
g1
++ + +
Gate
gr-1
• Switch Down & Gate ON: k message bits are shifted into the channel. The parity bits are formed in the register.
• Switch Up & Gate OFF: Contents of register are shifted into the channel.
25
![Page 26: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/26.jpg)
(7,4) Encoder Based on 1 + X + X3
+ +
Gate
Input 1 1 0 1
Register : 000 110 101 100 100initial 1st shift 2nd shift 3rd shift 4th shift
Codeword: 1 0 0 1 0 1 1
26
![Page 27: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/27.jpg)
Decoding of Cyclic Codes
• STEPS:
(1) Syndrome computation
(2) Associating the syndrome to the error pattern(2) Associating the syndrome to the error pattern
(3) Error correction
27
![Page 28: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/28.jpg)
Syndrome Computation
• Received word: r(X) = r0 + r1X +….+ rn-1Xn-1
• If r(X) is a correct codeword, it is divisible by g(X).
Otherwise: r(X) = q(X)g(X) + s(X).
• deg[s(X)] ≤ n-k-1.
• s(X) is called the syndrome polynomial.• s(X) is called the syndrome polynomial.
• s(X) = Rem[r(X)/g(X)] = Rem[ {a(X)g(X) + e(X)}/g(X)] =
Rem[e(X)/g(X)]
• The syndrome polynomial depends on the error pattern
only.
• s(X) is obtained by shifting r(X) into a divider-by-g(X) circuit.
The register contents are the syndrome bits.
28
![Page 29: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/29.jpg)
Syndrome Circuit
EELE 6338 29
![Page 30: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/30.jpg)
Circuit for Syndrome Computation
++
Gate
r = 0010110
Shift Input Register contents
30
Shift Input Register contents
0 0 0 (initial state)
1 0 0 0 0
2 1 1 0 0
3 1 1 1 0
4 0 0 1 1
5 1 0 1 1
6 0 1 1 1
7 0 1 0 1 (syndrome s)
![Page 31: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/31.jpg)
More on Syndrome Computation
• TH5.8 Let s(X) be the syndrome of a received polynomial r(X) = r0 +
r1X +….+ rn-1Xn-1 . Then the remainder resulting from dividing Xs(X)
by g(X) is the syndrome of r(1)(X), which is a cyclic shift of r(X).
• Proof: r(X) = r0 + r1X +….+ rn-1Xn-1
r(1)(X) = rn-1 + r0X +….+ r
n-2Xn-1 = rn-1 + Xr(X) + r
n-1Xnr(1)(X) = rn-1 + r0X +….+ r
n-2Xn-1 = rn-1 + Xr(X) + r
n-1Xn
= rn-1(Xn+1) + Xr(X)
c(X)g(X) + y(X) = rn-1 g(X)h(X)+ X{a(X)g(x) + s(X)}
where y(X) is the syndrome of r(1)(X) .
Xs(X) = {c(X) + Xa(X) + rn-1 h(X)}g(X) + y(X)
Therefore, Syndrome of r(1)(X)= Rem[Xs(X)/g(X)]. Q.E.D.
31
![Page 32: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/32.jpg)
More on Syndrome Computation (�)
• Note: for simplicity of notation, let Rem[Xs(X)/g(X)] be denoted by s(1)(X). s(1)(X) is NOT a cyclic shift of s(X), but the syndrome of r(1)(X) which is a cyclic shift of r(X).
• Example:
r(X) = X2 + X4 + X5; g(X) = 1 + X + X3
s(X) = Rem[r(X)/g(X)] = 1 + X2
r(1)(X) = X3 + X5 + X6
s(1)(X) = Rem[r(1)(X)/g(X)] = 1 (polynomial)
Also, s(1)(X) = Rem[Xs(X)/g(X)] = 1.
• It follows from TH 5.8 that, in general, the remainder s(i)(X) resulting from dividing Xis(X) by g(X) is the syndrome of r(i)(X).
32
![Page 33: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/33.jpg)
More on Syndrome Computation
(�)
Shift Input Register contents
++
Gate
Gate
r = 0010110
33
Shift Input Register contents
0 0 0 (initial state)
1 0 0 0 0
2 1 1 0 0
3 1 1 1 0
4 0 0 1 1
5 1 0 1 1
6 0 1 1 1
7 0 1 0 1 (syndrome s)
8 (input gate off) - 1 0 0 (syndrome s(1)
)
9 - 0 1 0 (syndrome s(2)
)
![Page 34: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/34.jpg)
General Decoding Circuit
34
![Page 35: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/35.jpg)
Meggit Decoder
1. Shift r(X) into the buffer B and the syndrome register R simultaneously. Once r(X) is completely shifted in B, R will contain s(X), the syndrome of r(X).
2. Based on the contents of R, the detection circuit yields the output e (0 or 1). the output e (0 or 1).
3. During the next clock cycle:
(a) Add e to the rightmost bit of B while shifting the contents of B. (The rightmost bit of B may be read out). Call the modified content of B: r1
(1)(X).
35
![Page 36: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/36.jpg)
Meggit Decoder (�)
(b) Add e to the left of R while shifting the contents of R.
The modified content of R is s1(1)(X), the syndrome of r1
(1)(X)
[will be shown soon].
4. Repeat steps 2-3 n times.
36
![Page 37: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/37.jpg)
More on Syndrome ComputationLet r(X) = r0 + r1X +….+ r
n-1Xn-1 has the syndrome s(X). Then
r(1)(X) = rn-1 + r0 X + ….+ r
n-2Xn-1 has the syndrome:
s(1)(X) = Rem[r(1)(X)/g(X)].
Define r1 (X) = r(X) + Xn-1 = r0 + r1X +….+ (rn-1+1)Xn-1
The syndrome of r1 (X), call it s1 (X):The syndrome of r1 (X), call it s1 (X):
s1 (X)= Rem[{r(X)+ Xn-1}/g(X)] = s(X) + Rem[Xn-1/g(X)]
r1(1)(X), which is one cyclic shift of r1 (X), has the syndrome
s1(1)(X) = Rem[X s1 (X)/g(X)] = Rem[Xs(X)/g(X)+ Xn/g(X)]
= s(1)(X) + 1 (since Xn +1 = g(X)h(X))
Therefore, adding “1” to the left of R removes the effect of the erroneous digit on the syndrome
37
![Page 38: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/38.jpg)
Worked Example
Consider the (7,4) Hamming code generated by 1+X+X3.
Error pattern Syndrome polynomial. Syndrome vector
X6
1 + X2
1 0 1
X5
1 + X + X2
1 1 1
X4
X + X2
0 1 1
Let c = 1 0 0 1 0 1 1 and r = 1 0 1 1 0 1 1
38
X4
X + X2
0 1 1
X3
1 + X 1 1 0
X2
X2
0 0 1
X1
X 0 1 0
X0
1 1 0 0
![Page 39: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/39.jpg)
Cyclic Decoding of the (7,4) Code
39
![Page 40: Cyclic Codessite.iugaza.edu.ps/ahdrouss/files/2010/02/Cyclic-Codes.pdf · 2013. 10. 6. · Title: Microsoft PowerPoint - Cyclic Codes Author: ammar Created Date: 10/6/2013 7:18:11](https://reader035.fdocuments.us/reader035/viewer/2022071401/60eb98b280249133cf2a7d40/html5/thumbnails/40.jpg)
40