SlideShare a Scribd company logo
Cyclic Codes
Yunghsiang S. Han
Graduate Institute of Communication Engineering,
National Taipei University
Taiwan
E-mail: yshan@mail.ntpu.edu.tw
Y. S. Han Cyclic codes 1
Description of Cyclic Codes
• If the components of an n-tuple v = (v0, v1, . . . , vn−1) are
cyclically shifted i places to the right, the resultant n-tuple
would be
v(i)
= (vn−i, vn−i+1, . . . , vn−1, v0, v1, . . . , vn−i−1).
• Cyclically shifting v i places to the right is equivalent to
cyclically shifting v n − i places to the left.
• An (n, k) linear code C is called a cyclic code if every cyclic shift
of a code vector in C is also a code vector in C.
• Code polynomial v(x) of the code vector v is defined as
v(x) = v0 + v1x + · · · + vn−1xn−1
.
• v(i)
(x) = xi
v(x) mod xn
+ 1.
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 2
Proof: Multiplying v(x) by xi
, we obtain
xi
v(x) = v0xi
+ v1xi+1
+ · · · + vn−i−1xn−1
+ · · · + vn−1xn+i−1
.
Then we manipulate the equation into the following form:
xi
v(x) = vn−i + vn−i+1x + · · · + vn−1xi−1
+ v0xi
+ · · ·
+vn−i−1xn−1
+ vn−i(xn
+ 1) + vn−i−1x(xn
+ 1)
+ · · · + vn−1xi−1
(xn
+ 1)
= q(x)(xn
+ 1) + v(i)
(x),
where q(x) = vn−i + vn−i+1x + · · · + vn−1xi−1
.
• The nonzero code polynomial of minimum degree in a cyclic code
C is unique.
• Let g(x) = g0 + g1x + · · · + gr−1xr−1
+ xr
be the nonzero code
polynomial of minimum degree in an (n, k) cyclic code C. Then
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 3
the constant term g0 must be equal to 1.
Proof: Suppose that g0 = 0. Then
g(x) = g1x + g2x2
+ · · · + gr−1xr−1
+ xr
= x(g1 + g2x + · · · + gr−1xr−2
+ xr−1
).
If we shift g(x) cyclically n − 1 places to the right (or one place
to the left), we obtain a nonzero code polynomial,
g1 + g2x + · · · + gr−1xr−2
+ xr−1
, which has a degree less than r.
Contradiction.
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 4
A (7, 4) Cyclic Code Gnerated by g(x) = 1 + x + x3
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 5
• Consider the polynomial xg(x), x2
g(x), . . . , xn−r−1
g(x). Clearly,
they are cyclic shifts of g(x) and hence code polynomials in C.
Since C is linear, a linear combination of
g(x), xg(x), . . . , xn−r−1
g(x),
v(x) = u0g(x) + u1xg(x) + · · · + un−r−1xn−r−1
g(x)
= (u0 + u1x + · · · + un−r−1xn−r−1
)g(x),
is also a code polynomial where ui ∈ {0, 1}.
• Let g(x) = 1 + g1x + · · · + gr−1xr−1
+ xr
. be the nonzero code
polynomial of minimum degree in an (n, k) cyclic code C. A
binary polynomial of degree n − 1 or less is a code polynomial if
and only if it is a multiple of g(x).
Proof: Let v(x) be a binary polynomial of degree n − 1 or less.
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 6
Suppose that v(x) is a multiple of g(x). Then
v(x) = (a0 + a1x + · · · + an−r−1xn−r−1
)g(x)
= a0g(x) + a1xg(x) + · · · + an−r−1xn−r−1
g(x).
Since v(x) ia a linear combination of the code polynomials,
g(x), xg(x), . . . , xn−r−1
g(x), it is a code polynomial in C.
Now let v(x) be a code polynomial in C. Dividing v(x) by g(x),
we obtain
v(x) = a(x)g(x) + b(x),
where the degree of b(x) is less than the degree of g(x). Since
v(x) and a(x)g(x) are code polynomials, b(x) is also a code
polynomial. Suppose b(x) = 0. Then b(x) is a code polynomial
with less degree than that of g(x). Contradiction.
• The number of binary polynomials of degree n − 1 or less that
are multiples of g(x) is 2n−r
.
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 7
• There are total of 2k
code polynomials in C, 2n−r
= 2k
, i.e.,
r = n − k.
•
• The polynomial g(x) is called the generator polynomial of the
code.
• The degree of g(x) is equal toi the number of parity-check digits
of the code.
• The generator polynomial g(x) of an (n, k) cyclic code is a factor
of xn
+ 1.
Proof: We have
xk
g(x) = (xn
+ 1) + g(k)
(x).
Since g(k)
(x) is the code polynomial obtained by shifting g(x) to
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 8
the right cyclically k times, g(k)
(x) is a multiple of g(x). Hence,
xn
+ 1 = {xk
+ a(x)}g(x).
• If g(x) is a polynomial of degree n − k and is a factor of xn
+ 1,
then g(x) generates an (n, k) cyclic code.
Proof: A linear combination of g(x), xg(x), . . . , xk−1
g(x),
v(x) = a0g(x) + a1xg(x) + · · · + ak−1xk−1
g(x)
= (a0 + a1x + · · · + ak−1xk−1
)g(x),
is a polynomial of degree n − 1 or less and is a multiple of g(x).
There are a total of 2k
such polynomial and they form an (n, k)
linear code.
Let v(x) = v0 + v1x + · · · + vn−1xn−1
be a code polynomial in
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 9
this code. We have
xv(x) = v0x + v1x2
+ · · · + vn−1xn
= vn−1(xn
+ 1) + (vn−1 + v0x + · · · + vn−2xn−1
)
= vn−1 (xn
+ 1) + v(1)
(x).
Since both xv(x) and xn
+ 1 are divisible by g(x), v(1)
must be
divisible by g(x). Hence, v(1)
(x) is a code polynomial and the
code generated by g(x) is a cyclic code.
• Suppose that the message to be encoded is
u = (u0, u1, . . . , uk−1). Then
xn−k
u(x) = u0xn−k
+ u1xn−k+1
+ · · · + uk−1xn−1
.
Dividing xn−k
u(x) by g(x), we have
xn−k
u(x) = a(x)g(x) + b(x).
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 10
Since the degree of g(x) is n − k, the degree of b(x) must be
n − k − 1 or less. Then
b(x) + xn−k
u(x) = a(x)g(x)
is a multiple of g(x) and therefore it is a code polynomial.
b(x) + xn−k
u(x) = b0 + b1x + · · · + bn−k−1xn−k−1
+u0xn−k
+ u1xn−k+1
+ · · · + uk−1xn−1
then corresponds to the code vector
(b0, b1, . . . , bn−k−1, u0, u1, . . . , uk−1).
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 11
A (7, 4) Cyclic Code Gnerated by g(x) = 1 + x + x3
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 12
Generator and Parity-Check Matrices
• The generator matrix of an (n, k) code C is as follows:
G =















g0 g1 g2 · · · · · gn−k 0 0 0 · · 0
0 g0 g1 g2 · · · · · gn−k 0 0 · · 0
0 0 g0 g1 g2 · · · · · gn−k 0 · · 0
· ·
· ·
· ·
0 0 · · · 0 g0 g1 g2 · · · · · gn−k















• In general, G is not in systematic form. However, it can be put
into systematic form with row operation.
• Let
xn
+ 1 = g(x)h(x),
where the polynomial h(x) has the degree k and is of the
following form:
h(x) = h0 + h1x + · · · + hkxk
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 13
with h0 = hk = 1.
• A parity-check matrix of C may be obtained from h(x).
• Let v be a code vector in C and v(x) = a(x)g(x). Then
v(x)h(x) = a(x)g(x)h(x)
= a(x)(xn
+ 1)
= a(x) + xn
a(x).
Since the degree of a(x) is k − 1 or less, the powers
xk
, xk+1
, . . . , xn−1
do not appear in a(x) + xn
a(x). Therefore,
k

i=0
hivn−i−j = 0 for 1 ≤ j ≤ n − k.
We take the reciprocal of h(x),
xk
h(x−1
) = hk + hk−1x + hk−2x2
+ · · · + h0xk
,
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 14
and can see that xk
h(x−1
) is also a factor of xn
+ 1. xk
h(x−1
)
then generates an (n, n − k) cyclic code with the following
(n − k) × n matrix as a generator matrix:
H =















hk hk−1 hk−2 · · · · h0 0 0 · · 0
0 hk hk−1 hk−2 · · · · h0 0 · · 0
0 0 hk hk−1 · · · · · h0 · · 0
· ·
· ·
· ·
0 0 · · 0 hk hk−1 hk−2 · · · · h0















Then H is a parity-check matrix of the cyclic code C. We call
h(x) the parity polynomial of C.
• Let C be an (n, k) cyclic code with generator polynomial g(x).
The dual code of C is also cyclic and is generated by the
polynomial xk
h(x−1
), where h(x) = (xn
+ 1)/g(x).
• Let
xn−k−1
= ai(x)g(x) + bi(x) for 0 ≤ i ≤ k − 1,
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 15
where bi(x) = bi0 + bi1 + · · · + bi(n−k−1). Since bi(x) + xn−k+i
are
multiples of g(x), they are code polynomials. Then
G =













b00 b01 b02 · · · b0(n−k−1) 1 0 0 · · · 0
b10 b11 b12 · · · b1(n−k−1) 0 1 0 · · · 0
b20 b21 b22 · · · b2(n−k−1) 0 1 · · · 0
.
.
.
.
.
.
.
.
.
b(k−1)0 b(k−1)1 b(k−1)2 · · · b(k−1)(n−k−1) 0 0 0 · · · 1













.
• The corresponding parity-check matrix for C is
H =













1 0 0 · · · 0 b00 b10 b20 · · · b(k−1)0
0 1 0 · · · 0 b01 b11 b21 · · · b(k−1)1
0 0 1 · · · 0 b02 b12 b22 · · · b(k−1)2
.
.
.
.
.
.
.
.
.
0 0 0 · · · 1 b0(n−k−1) b1(n−k−1) b2(n−k−1) · · · b(k−1)(n−k−1)













.
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 16
Encoding of Cyclic Codes
• Encoding process: (1) Multiply u(x) by xn−k
; (2) divide
xn−k
u(x) by g(x); (3) form the code word b(x) + xn−k
u(x).
( ) ( ) ( )
n-k stage
…
Message Xn-ku(X) Code word
Parity-check
digits
g1 g2 gn-k-1
Gate
bn-k-1
b2
b1
b0
•
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 17
Example
• Consider the (7, 4) cyclic code generated by g(x) = 1 + x + x3
.
Suppose that the message u = (1 0 1 1) is to be encoded. The
contentents in the register are as follows:
Input Register contents
0 0 0 (initial state)
1 1 1 0 (first shift)
1 1 0 1 (second shift)
0 1 0 0 (third shift)
1 1 0 0 (fourth shift)
After four shifts, the contents of the register are (1 0 0). Thus
the complete code vector is (1 0 0 1 0 1 1).
(1 0 1 1)
Message Xn-ku(X)
Code word
Gate
Parity digits
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 18
Encoding by Parity Polynomial
• Since hk = 1, we have
vn−k−j =
k−1

i=0
hivn−i−j for 1 ≤ j ≤ n − k,
which is known as a difference equation.
vn−k−1 = h0vn−1+h1vn−2+· · ·+hk−1vn−k = uk−1+h1uk−2+· · ·+hk−1u0
vn−k−2 = uk−2 + h1uk−3 + · · · + hk−1vn−k−1
• Encoding circuit:
Gate2
Gate1 u0 u1 Uk-2 Uk-1
• • • • • •
h1
h2
hk-2
hk-1
+
+
+
+
k stage
° Output to channel
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 19
Example
• The parity polynomial of the (7, 4) cyclic code generated by
g(x) = 1 + x + x3
is
h(x) =
x7
+ 1
1 + x + x3
= 1 + x + x2
+ x4
.
The encoding circuit:
h0 = 1
Gate 2
Gate 1 p
Output
Input
Suppose that the message to be encoded is (1 0 1 1). Then
v3 = 1, v4 = 0, v5 = 1, v6 = 1. The parity-check digits are
v2 = v6 + v3 + v4 = 1 + 1 + 0 = 0
v1 = v5 + v4 + v3 = 1 + 0 + 1 = 0
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 20
v0 = v4 + v3 + v2 = 0 + 1 + 0 = 1.
The code vector that corresponds to the message (1 0 1 1) is
(1 0 0 1 0 1 1).
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 21
Syndrome Computation
• Let r = (r0, r1, . . . , rn−1) be the received vector. The syndrome is
calculated as s = r · HT
, where H is the parity-check matrix.
• If syndrome is not identical to zero, r is not a code vector and
the presence of errors has been detected.
• Dividing r(x) by the generator polynomial g(x), we obtain
r(x) = a(x)g(x) + s(x).
• The n − k coefficients of s(x) form the syndrome s. We call s(x)
the syndrome.
r(x)/g(x)  g1
s0 s1
…
Gate
g2 gn-k-1
sn-k-1
r(X)
Received
vector
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 22
• If C is a systematic code, then the syndrome is simply the vector
sum of the received parity digits and the parity-check digits
recomputed from the received information digits.
• Let s(x) be the syndrome of a received polynomial r(x). Then
the remainder s(1)
(x) resulting from dividing xs(x) by the
generator polynomial g(x) is the syndrome of r(1)
(x), which is a
cyclic shift of r(x).
Proof: We have
xr(x) = rn−1(xn
+ 1) + r(1)
(x).
Then
c(x)g(x) + ρ(x) = rn−1g(x)h(x) + x[a(x)g(x) + s(x)],
where ρ(x) is the remainder resulting from dividing r(1)
(x) by
g(x). Then ρ(x) is the syndrome of r(1)
(x). Rearranging the
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 23
above equation, we have
xs(x) = [c(x) + rn−1h(x) + xa(x)]g(x) + ρ(x).
It is clearly that ρ(x) is also the remainder resulting from
dividing xs(x) by g(x). Therefore, ρ(x) = s(1)
(x).
• The remainder s(i)
(x) resulting from dividing xi
s(x) be the
generator polynomial g(x) is the syndrome of r(i)
(x), which is
the ith cyclic shift of r(x).
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 24
Example
Consider the (7, 4) cyclic code generated by g(x) = 1 + x + x3
.
Suppose that the received vector is r = (0 0 1 0 1 1 0). The
syndrome of r is s = (1 0 1). As the received vector is shifted into
the circuit, the contents in the register are as follows:
1 0
Gate
1
Gate
input
If the register is shifted once more with the input gate disabled, the
new contents will be s(1)
= (1 0 0), which is the syndrome of
r(1)
= (0 0 0 1 0 1 1).
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 25
• We may shift the received vector r(x) into the syndrome register
from the right end. However, after the entire r(x) has been
shifted into the register, the contents in the register do not form
the sybdrome of r(x); rather, they form the syndrome s(n−k)
(x)
of r(n−k)
(x).
g1
s0 s1
…
Gate
g2 gn-k-1
sn-k-1
r(X)
Received vector
xn-kr(x)/g(x) 
Proof: We have
xn−k
r(x) = a(x)g(x) + ρ(x).
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 26
It is known that
xn−k
r(x) = b(x)(xn
+ 1) + r(n−k)
(x).
Hence,
r(n−k)
(x) = [b(x)h(x) + a(x)]g(x) + ρ(x).
When r(n−k)
(x) is divided by g(x), ρ(x) is also the remainder.
Therefore, ρ(x) is indeed the syndrome of r(n−k)
(x).
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 27
Error Detection
• Let v(x) be the transmitted code word and
e(x) = e0 + e1x + · · · + en−1xn−1
be the error pattern. Then
r(x) = v(x) + e(x) = b(x)g(x) + e(x).
• Following the definition of syndrome, we have
e(x) = [a(x) + b(x)]g(x) + s(x).
This shows that the syndrome is actually equal to the remainder
resulting from dividing the error pattern by the generator
polynomial.
• The decoder has to estimate e(x) based on the syndrome s(x).
• If e(x) is identical to a code vector, e(x) is an undetectable error
pattern.
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 28
• The error-detection circuit is simply a syndrome circuit with an
OR gate with the syndrome digits as inputs.
• For a cyclic code, an error pattern with errors confined to i
high-order positions and  − i low-order positions is also regarded
as a burst of length  or less. such a burst is called end-around
burst.
• An (n, k) cyclic code is capable of detecting any error burst of
length n − k or less, including the end-around bursts.
Proof: Suppose that the error pattern is a burst of length of
n − k or less. Then
e(x) = xj
B(x),
where 0 ≤ j ≤ n − 1 and B(x) is a polynomial of degree
n − k − 1 or less. Since the degree of B(x) is less than that of
g(x), B(x) is not divisible by g(x). Since g(x) is a factor of
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 29
xn
+ 1 and x is not a factor of g(x), g(x) and xj
must be
relatively prime. Therefore, e(x) is not divisible by g(x). The
last part of the above statement is left as an exercise.
• The fraction of undetectable bursts of length n − k + 1 is
2−(n−k−1)
.
Proof: Consider the bursts of length n − k + 1 starting from the
ith digit position and ending at the (i + n − k)th digit position.
There are 2n−k−1
such burst. Among these bursts, the only one
that cannot be detected is
e(x) = xi
g(x).
Therefore, the fraction of undetectable bursts of length n − k + 1
starting from the ith digit position is 2−(n−k−1)
.
• For   n − k + 1, the fraction of undetectable error bursts of
length  is 2−(n−k)
. The proof is left as an exercise.
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 30
Decoding of Cyclic Codes
• Decoding of linear codes consists of three steps: (1) syndrome
computation; (2) association of the syndrome to an error pattern;
(3) error correction.
• The cyclic structure structure of a cyclic code allows us to
decode a received vector r(x) in serial manner.
• The received digits are decoded one at a time and each digit is
decoded with the same circuitry.
• The decoding circuit checks whether the syndrome ß(x)
corresponds to a correctable error pattern e(x) with an error at
the highest-order position xn−1
(i.e., en−1 = 1).
• If ß(x) does not correspond to an error pattern with en−1 = 1,
the received polynomial and the syndrome register are cyclically
shifted once simultaneously. By doing this, we have r(1)
(x) and
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 31
s(1)
(x).
• The second digit rn−2 of r(x) becomes the first digit of r(1)
(x).
The same decoding processes.
• If the syndrome s(x) of r(x) does correspond to an error pattern
with an error at the location xn−1
, the first received digit rn−1 is
an erroneous digit and it must be corrected by taking the sum
rn−1 ⊕ en−1.
• This correction results in a modified received polynomial, denoted
by r1(x) = r0 + r1x + · · · + rn−2xn−2
+ (rn−1 ⊕ en−1)xn−1
.
• The effect of the error digit en−1 on the syndrome can be
achieved by adding the syndrome of e
(x) = xn−1
to s(x).
• The syndrome s
(1)
1 of r
(1)
1 (x) is the remainder resulting from
dividing x[s(x) + xn−1
] by the generator polynomial g(x).
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 32
• Since the remainders resulting from dividing xs(x) and xn
by
g(x) are s(1)
(x) and 1, respectively, we have
s
(1)
1 (x) = s(1)(x) + 1.
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 33
Meggitt Decoder I
Gate
Gate
Gate
Gate
Gate
Buffer registers
Syndrome register
Error pattern detection circuit
Syndrome modification
r(X)
Received
vector
Corrected
vector
Feedback connection
ri
ei
s(x) --- r(x)
s(1)(x) --- r(1)(x)
(r0, r1, … , rn-1)
=
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 34
Example
Consider the decoding of the (7, 4) cyclic code generated by
g(x) = 1 + x + x3
. This code has minimum distance 3 and is capable
of correcting any single error. The seven single-error patterns and
their corresponding syndromes are as follows:
(1 0 1)
(1 1 1)
(0 1 1)
(1 1 0)
(0 0 1)
(0 1 0)
(1 0 0)
s(X) = 1 + X2
s(X) = 1 + X + X2
s(X) = X + X2
s(X) = 1 + X
s(X) = X2
s(X) = X
s(X) = 1
e6(X) = X6
e5(X) = X5
e4(X) = X4
e3(X) = X3
e2(X) = X2
e1(X) = X1
e0(X) = X0
Syndrome vector
(s0, s1, s2)
Syndrome
s(X)
Error pattern
e(X)
Suppose that the code vector v = (1 0 1 1 0 1 1) is transmitted and
r = (1 0 1 1 0 1 1).
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 35
Gate
Gate
Gate
Multiplexer
0 1
0
r(X)
Input
Buffer register
r’(X)
Output
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 36
1 0 1
1 0 1
1
0
1 1 1
0 1 1
0
0
1 1 0
1 1 0
1
0
0 1 1
1 0 1
1
0
0 0 1
0 1 1
1 1 0
1 1 1
Initial
1st shift
2st shift
3rd shift
Syndrome
register
Buffer register
Pointer
Correction
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 37
0 0 0
1 1 1
1
0
1 0 1
1 1 1
0
1
0 1 1
0 1 0
1
0
Error corrected
1 0 1
0 0 1
1
0
Corrected word
1 0 1
0 0 0
0 0 0
0 0 0
4th shift
5th shift
6th shift
7th shift
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 38
Meggitt Decoder II
• To decode a cyclic code, the received polynomial r(x) may be
shifted into the syndrome register from the right end for
computing the syndrome.
• When r(x) has been shifted into the syndrome register, the
register contains s(n−k)
(x), which is the syndrome of r(n−k)
(x).
If s(n−k)
(x) corresponds to an error pattern e(x) with en−1 = 1,
the highest-order digit rn−1 of r(x) is erroneous and must be
corrected.
• In r(n−k)
(x), the digit rn−1 is at the location xn−k−1
. When rn−1
is corrected, the error effect must be removed from s(n−k)
(x).
• The new syndrome s
(n−k)
1 (x) is the sum of s(n−k)
(x) and the
remainder ρ(x) resulting from dividing xn−k−1
by g(x). Since
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 39
the degree of xn−k−1
is less than the degree of g(x),
s
(n−k)
1 (x) = s(n−k)
(x) + xn−k−1
.
Error-pattern detection circuit
Syndrome register
Buffer register r(X)
Gate
Gate
Gate
Gate
Gate
r(X)
Corrected
vector
Received
vector
Feedback connection
ri
ei
(Syndrome
modification)
(r0, r1, … ,rn-1)
=
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 40
Example
Again, we consider the decoding of the (7, 4) cyclic code generated by
g(X) = 1 + X + X3
. Suppose that the received polynomial r(X) is
shifted into the syndrome register from the right end. The seven
single-error patterns and their corresponding syndromes are as
follows:
(0 0 1)
(0 1 0)
(1 0 0)
(1 0 1)
(1 1 1)
(0 1 1)
(1 1 0)
s(3)(X) = X2
s(3)(X) = X
s(3)(X) = 1
s(3)(X) = 1 + X2
s(3)(X) = 1 + X + X2
s(3)(X) = X + X2
s(3)(X) = 1 + X
e(X) = X6
e(X) = X5
e(X) = X4
e(X) = X3
e(X) = X2
e(X) = X1
e(X) = X0
Syndrome vector
(s0, s1, s2)
Syndrome
s(3)(X)
Error pattern
e(X)
We see that only when e(X) = X6
occurs, the syndrome is (0 0 1)
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 41
after the entire received polynomial r(X) has been shifted into the
syndrome register. If the single error occurs at the location Xi
with
i = 6, the syndrome in the register will not be (0 0 1) after the entire
received polynomial r(X) has been shifted into the syndrome
register. However, another 6i shifts, the syndrome register will
contain (0 0 1). Based on this fact, we obtain another decoding
circuit for the (7, 4) cyclic code generated by g(X) = 1 + X + X3
.
Graduate Institute of Communication Engineering, National Taipei University
Y. S. Han Cyclic codes 42
Gate
Gate
Gate
Multiplexer
r(X)
Input
Buffer register
r’(X)
Output
Graduate Institute of Communication Engineering, National Taipei University

More Related Content

What's hot

Digital Signal Processing Tutorial:Chapt 3 frequency analysis
Digital Signal Processing Tutorial:Chapt 3 frequency analysisDigital Signal Processing Tutorial:Chapt 3 frequency analysis
Digital Signal Processing Tutorial:Chapt 3 frequency analysisChandrashekhar Padole
 
Pseudo Random Code
Pseudo Random CodePseudo Random Code
Pseudo Random Code
Pei-Che Chang
 
Implementation of Digital Filters
Implementation of Digital FiltersImplementation of Digital Filters
Implementation of Digital Filters
op205
 
Computing DFT using Matrix method
Computing DFT using Matrix methodComputing DFT using Matrix method
Computing DFT using Matrix method
Sarang Joshi
 
Fading & Doppler Effect
Fading & Doppler EffectFading & Doppler Effect
Fading & Doppler Effect
Swapnil Bangera
 
Convolutional codes
Convolutional codesConvolutional codes
Convolutional codes
Abdullaziz Tagawy
 
Intelligent Networks
Intelligent NetworksIntelligent Networks
Intelligent Networks
Susma S
 
Channel equalization
Channel equalizationChannel equalization
Channel equalization
Munnangi Anirudh
 
Dsp U Lec04 Discrete Time Signals & Systems
Dsp U   Lec04 Discrete Time Signals & SystemsDsp U   Lec04 Discrete Time Signals & Systems
Dsp U Lec04 Discrete Time Signals & Systems
taha25
 
Chap04
Chap04Chap04
Matched filter detection
Matched filter detectionMatched filter detection
Matched filter detection
SURYA DEEPAK
 
Delay Calculation in CMOS Chips Using Logical Effort by Prof. Akhil Masurkar
Delay Calculation in CMOS Chips Using Logical Effort by Prof. Akhil MasurkarDelay Calculation in CMOS Chips Using Logical Effort by Prof. Akhil Masurkar
Delay Calculation in CMOS Chips Using Logical Effort by Prof. Akhil MasurkarAkhil Masurkar
 
Basics of Digital Filters
Basics of Digital FiltersBasics of Digital Filters
Basics of Digital Filters
op205
 
4. operations of signals
4. operations of signals 4. operations of signals
4. operations of signals
MdFazleRabbi18
 
Z transform ROC eng.Math
Z transform ROC eng.MathZ transform ROC eng.Math
Z transform ROC eng.Math
Adhana Hary Wibowo
 
Dsp U Lec05 The Z Transform
Dsp U   Lec05 The Z TransformDsp U   Lec05 The Z Transform
Dsp U Lec05 The Z Transform
taha25
 
Fft presentation
Fft presentationFft presentation
Fft presentationilker Şin
 
Sampling Theorem, Quantization Noise and its types, PCM, Channel Capacity, Ny...
Sampling Theorem, Quantization Noise and its types, PCM, Channel Capacity, Ny...Sampling Theorem, Quantization Noise and its types, PCM, Channel Capacity, Ny...
Sampling Theorem, Quantization Noise and its types, PCM, Channel Capacity, Ny...
Waqas Afzal
 

What's hot (20)

Matched filter
Matched filterMatched filter
Matched filter
 
Digital Signal Processing Tutorial:Chapt 3 frequency analysis
Digital Signal Processing Tutorial:Chapt 3 frequency analysisDigital Signal Processing Tutorial:Chapt 3 frequency analysis
Digital Signal Processing Tutorial:Chapt 3 frequency analysis
 
Pseudo Random Code
Pseudo Random CodePseudo Random Code
Pseudo Random Code
 
Implementation of Digital Filters
Implementation of Digital FiltersImplementation of Digital Filters
Implementation of Digital Filters
 
Computing DFT using Matrix method
Computing DFT using Matrix methodComputing DFT using Matrix method
Computing DFT using Matrix method
 
Fading & Doppler Effect
Fading & Doppler EffectFading & Doppler Effect
Fading & Doppler Effect
 
Convolutional codes
Convolutional codesConvolutional codes
Convolutional codes
 
Intelligent Networks
Intelligent NetworksIntelligent Networks
Intelligent Networks
 
Channel equalization
Channel equalizationChannel equalization
Channel equalization
 
Dsp U Lec04 Discrete Time Signals & Systems
Dsp U   Lec04 Discrete Time Signals & SystemsDsp U   Lec04 Discrete Time Signals & Systems
Dsp U Lec04 Discrete Time Signals & Systems
 
Chap04
Chap04Chap04
Chap04
 
Matched filter detection
Matched filter detectionMatched filter detection
Matched filter detection
 
Delay Calculation in CMOS Chips Using Logical Effort by Prof. Akhil Masurkar
Delay Calculation in CMOS Chips Using Logical Effort by Prof. Akhil MasurkarDelay Calculation in CMOS Chips Using Logical Effort by Prof. Akhil Masurkar
Delay Calculation in CMOS Chips Using Logical Effort by Prof. Akhil Masurkar
 
Basics of Digital Filters
Basics of Digital FiltersBasics of Digital Filters
Basics of Digital Filters
 
4. operations of signals
4. operations of signals 4. operations of signals
4. operations of signals
 
Z transform ROC eng.Math
Z transform ROC eng.MathZ transform ROC eng.Math
Z transform ROC eng.Math
 
Dsp U Lec05 The Z Transform
Dsp U   Lec05 The Z TransformDsp U   Lec05 The Z Transform
Dsp U Lec05 The Z Transform
 
Chapter 03 cyclic codes
Chapter 03   cyclic codesChapter 03   cyclic codes
Chapter 03 cyclic codes
 
Fft presentation
Fft presentationFft presentation
Fft presentation
 
Sampling Theorem, Quantization Noise and its types, PCM, Channel Capacity, Ny...
Sampling Theorem, Quantization Noise and its types, PCM, Channel Capacity, Ny...Sampling Theorem, Quantization Noise and its types, PCM, Channel Capacity, Ny...
Sampling Theorem, Quantization Noise and its types, PCM, Channel Capacity, Ny...
 

Similar to cyclic_code.pdf

DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
ShivangiSingh241
 
Robust Control of Uncertain Switched Linear Systems based on Stochastic Reach...
Robust Control of Uncertain Switched Linear Systems based on Stochastic Reach...Robust Control of Uncertain Switched Linear Systems based on Stochastic Reach...
Robust Control of Uncertain Switched Linear Systems based on Stochastic Reach...
Leo Asselborn
 
Integral Calculus Anti Derivatives reviewer
Integral Calculus Anti Derivatives reviewerIntegral Calculus Anti Derivatives reviewer
Integral Calculus Anti Derivatives reviewer
JoshuaAgcopra
 
Kolmogorov complexity and topological arguments
Kolmogorov complexity and topological argumentsKolmogorov complexity and topological arguments
Kolmogorov complexity and topological arguments
shenmontpellier
 
QMC: Operator Splitting Workshop, A Splitting Method for Nonsmooth Nonconvex ...
QMC: Operator Splitting Workshop, A Splitting Method for Nonsmooth Nonconvex ...QMC: Operator Splitting Workshop, A Splitting Method for Nonsmooth Nonconvex ...
QMC: Operator Splitting Workshop, A Splitting Method for Nonsmooth Nonconvex ...
The Statistical and Applied Mathematical Sciences Institute
 
Cyclic code non systematic
Cyclic code non systematicCyclic code non systematic
Cyclic code non systematic
Nihal Gupta
 
kactl.pdf
kactl.pdfkactl.pdf
kactl.pdf
Rayhan331
 
SPDE presentation 2012
SPDE presentation 2012SPDE presentation 2012
SPDE presentation 2012
Zheng Mengdi
 
ISI MSQE Entrance Question Paper (2010)
ISI MSQE Entrance Question Paper (2010)ISI MSQE Entrance Question Paper (2010)
ISI MSQE Entrance Question Paper (2010)
CrackDSE
 
Density theorems for anisotropic point configurations
Density theorems for anisotropic point configurationsDensity theorems for anisotropic point configurations
Density theorems for anisotropic point configurations
VjekoslavKovac1
 
Probabilistic Control of Switched Linear Systems with Chance Constraints
Probabilistic Control of Switched Linear Systems with Chance ConstraintsProbabilistic Control of Switched Linear Systems with Chance Constraints
Probabilistic Control of Switched Linear Systems with Chance Constraints
Leo Asselborn
 
2018 MUMS Fall Course - Statistical Representation of Model Input (EDITED) - ...
2018 MUMS Fall Course - Statistical Representation of Model Input (EDITED) - ...2018 MUMS Fall Course - Statistical Representation of Model Input (EDITED) - ...
2018 MUMS Fall Course - Statistical Representation of Model Input (EDITED) - ...
The Statistical and Applied Mathematical Sciences Institute
 
Efficient end-to-end learning for quantizable representations
Efficient end-to-end learning for quantizable representationsEfficient end-to-end learning for quantizable representations
Efficient end-to-end learning for quantizable representations
NAVER Engineering
 
Integration techniques
Integration techniquesIntegration techniques
Integration techniquesKrishna Gali
 
Solution to schrodinger equation with dirac comb potential
Solution to schrodinger equation with dirac comb potential Solution to schrodinger equation with dirac comb potential
Solution to schrodinger equation with dirac comb potential
slides
 
Control of Uncertain Nonlinear Systems Using Ellipsoidal Reachability Calculus
Control of Uncertain Nonlinear Systems Using Ellipsoidal Reachability CalculusControl of Uncertain Nonlinear Systems Using Ellipsoidal Reachability Calculus
Control of Uncertain Nonlinear Systems Using Ellipsoidal Reachability Calculus
Leo Asselborn
 
Control of Discrete-Time Piecewise Affine Probabilistic Systems using Reachab...
Control of Discrete-Time Piecewise Affine Probabilistic Systems using Reachab...Control of Discrete-Time Piecewise Affine Probabilistic Systems using Reachab...
Control of Discrete-Time Piecewise Affine Probabilistic Systems using Reachab...
Leo Asselborn
 

Similar to cyclic_code.pdf (20)

DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
DIGITAL COMMUNICATION: ENCODING AND DECODING OF CYCLIC CODE
 
Robust Control of Uncertain Switched Linear Systems based on Stochastic Reach...
Robust Control of Uncertain Switched Linear Systems based on Stochastic Reach...Robust Control of Uncertain Switched Linear Systems based on Stochastic Reach...
Robust Control of Uncertain Switched Linear Systems based on Stochastic Reach...
 
Integral Calculus Anti Derivatives reviewer
Integral Calculus Anti Derivatives reviewerIntegral Calculus Anti Derivatives reviewer
Integral Calculus Anti Derivatives reviewer
 
Kolmogorov complexity and topological arguments
Kolmogorov complexity and topological argumentsKolmogorov complexity and topological arguments
Kolmogorov complexity and topological arguments
 
QMC: Operator Splitting Workshop, A Splitting Method for Nonsmooth Nonconvex ...
QMC: Operator Splitting Workshop, A Splitting Method for Nonsmooth Nonconvex ...QMC: Operator Splitting Workshop, A Splitting Method for Nonsmooth Nonconvex ...
QMC: Operator Splitting Workshop, A Splitting Method for Nonsmooth Nonconvex ...
 
Taylor problem
Taylor problemTaylor problem
Taylor problem
 
Cyclic code non systematic
Cyclic code non systematicCyclic code non systematic
Cyclic code non systematic
 
kactl.pdf
kactl.pdfkactl.pdf
kactl.pdf
 
SPDE presentation 2012
SPDE presentation 2012SPDE presentation 2012
SPDE presentation 2012
 
ISI MSQE Entrance Question Paper (2010)
ISI MSQE Entrance Question Paper (2010)ISI MSQE Entrance Question Paper (2010)
ISI MSQE Entrance Question Paper (2010)
 
Density theorems for anisotropic point configurations
Density theorems for anisotropic point configurationsDensity theorems for anisotropic point configurations
Density theorems for anisotropic point configurations
 
Probabilistic Control of Switched Linear Systems with Chance Constraints
Probabilistic Control of Switched Linear Systems with Chance ConstraintsProbabilistic Control of Switched Linear Systems with Chance Constraints
Probabilistic Control of Switched Linear Systems with Chance Constraints
 
2018 MUMS Fall Course - Statistical Representation of Model Input (EDITED) - ...
2018 MUMS Fall Course - Statistical Representation of Model Input (EDITED) - ...2018 MUMS Fall Course - Statistical Representation of Model Input (EDITED) - ...
2018 MUMS Fall Course - Statistical Representation of Model Input (EDITED) - ...
 
Efficient end-to-end learning for quantizable representations
Efficient end-to-end learning for quantizable representationsEfficient end-to-end learning for quantizable representations
Efficient end-to-end learning for quantizable representations
 
Integration techniques
Integration techniquesIntegration techniques
Integration techniques
 
Solution to schrodinger equation with dirac comb potential
Solution to schrodinger equation with dirac comb potential Solution to schrodinger equation with dirac comb potential
Solution to schrodinger equation with dirac comb potential
 
Control of Uncertain Nonlinear Systems Using Ellipsoidal Reachability Calculus
Control of Uncertain Nonlinear Systems Using Ellipsoidal Reachability CalculusControl of Uncertain Nonlinear Systems Using Ellipsoidal Reachability Calculus
Control of Uncertain Nonlinear Systems Using Ellipsoidal Reachability Calculus
 
Control of Discrete-Time Piecewise Affine Probabilistic Systems using Reachab...
Control of Discrete-Time Piecewise Affine Probabilistic Systems using Reachab...Control of Discrete-Time Piecewise Affine Probabilistic Systems using Reachab...
Control of Discrete-Time Piecewise Affine Probabilistic Systems using Reachab...
 
cswiercz-general-presentation
cswiercz-general-presentationcswiercz-general-presentation
cswiercz-general-presentation
 
Assignment6
Assignment6Assignment6
Assignment6
 

Recently uploaded

Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 

Recently uploaded (20)

Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 

cyclic_code.pdf

  • 1. Cyclic Codes Yunghsiang S. Han Graduate Institute of Communication Engineering, National Taipei University Taiwan E-mail: yshan@mail.ntpu.edu.tw
  • 2. Y. S. Han Cyclic codes 1 Description of Cyclic Codes • If the components of an n-tuple v = (v0, v1, . . . , vn−1) are cyclically shifted i places to the right, the resultant n-tuple would be v(i) = (vn−i, vn−i+1, . . . , vn−1, v0, v1, . . . , vn−i−1). • Cyclically shifting v i places to the right is equivalent to cyclically shifting v n − i places to the left. • An (n, k) linear code C is called a cyclic code if every cyclic shift of a code vector in C is also a code vector in C. • Code polynomial v(x) of the code vector v is defined as v(x) = v0 + v1x + · · · + vn−1xn−1 . • v(i) (x) = xi v(x) mod xn + 1. Graduate Institute of Communication Engineering, National Taipei University
  • 3. Y. S. Han Cyclic codes 2 Proof: Multiplying v(x) by xi , we obtain xi v(x) = v0xi + v1xi+1 + · · · + vn−i−1xn−1 + · · · + vn−1xn+i−1 . Then we manipulate the equation into the following form: xi v(x) = vn−i + vn−i+1x + · · · + vn−1xi−1 + v0xi + · · · +vn−i−1xn−1 + vn−i(xn + 1) + vn−i−1x(xn + 1) + · · · + vn−1xi−1 (xn + 1) = q(x)(xn + 1) + v(i) (x), where q(x) = vn−i + vn−i+1x + · · · + vn−1xi−1 . • The nonzero code polynomial of minimum degree in a cyclic code C is unique. • Let g(x) = g0 + g1x + · · · + gr−1xr−1 + xr be the nonzero code polynomial of minimum degree in an (n, k) cyclic code C. Then Graduate Institute of Communication Engineering, National Taipei University
  • 4. Y. S. Han Cyclic codes 3 the constant term g0 must be equal to 1. Proof: Suppose that g0 = 0. Then g(x) = g1x + g2x2 + · · · + gr−1xr−1 + xr = x(g1 + g2x + · · · + gr−1xr−2 + xr−1 ). If we shift g(x) cyclically n − 1 places to the right (or one place to the left), we obtain a nonzero code polynomial, g1 + g2x + · · · + gr−1xr−2 + xr−1 , which has a degree less than r. Contradiction. Graduate Institute of Communication Engineering, National Taipei University
  • 5. Y. S. Han Cyclic codes 4 A (7, 4) Cyclic Code Gnerated by g(x) = 1 + x + x3 Graduate Institute of Communication Engineering, National Taipei University
  • 6. Y. S. Han Cyclic codes 5 • Consider the polynomial xg(x), x2 g(x), . . . , xn−r−1 g(x). Clearly, they are cyclic shifts of g(x) and hence code polynomials in C. Since C is linear, a linear combination of g(x), xg(x), . . . , xn−r−1 g(x), v(x) = u0g(x) + u1xg(x) + · · · + un−r−1xn−r−1 g(x) = (u0 + u1x + · · · + un−r−1xn−r−1 )g(x), is also a code polynomial where ui ∈ {0, 1}. • Let g(x) = 1 + g1x + · · · + gr−1xr−1 + xr . be the nonzero code polynomial of minimum degree in an (n, k) cyclic code C. A binary polynomial of degree n − 1 or less is a code polynomial if and only if it is a multiple of g(x). Proof: Let v(x) be a binary polynomial of degree n − 1 or less. Graduate Institute of Communication Engineering, National Taipei University
  • 7. Y. S. Han Cyclic codes 6 Suppose that v(x) is a multiple of g(x). Then v(x) = (a0 + a1x + · · · + an−r−1xn−r−1 )g(x) = a0g(x) + a1xg(x) + · · · + an−r−1xn−r−1 g(x). Since v(x) ia a linear combination of the code polynomials, g(x), xg(x), . . . , xn−r−1 g(x), it is a code polynomial in C. Now let v(x) be a code polynomial in C. Dividing v(x) by g(x), we obtain v(x) = a(x)g(x) + b(x), where the degree of b(x) is less than the degree of g(x). Since v(x) and a(x)g(x) are code polynomials, b(x) is also a code polynomial. Suppose b(x) = 0. Then b(x) is a code polynomial with less degree than that of g(x). Contradiction. • The number of binary polynomials of degree n − 1 or less that are multiples of g(x) is 2n−r . Graduate Institute of Communication Engineering, National Taipei University
  • 8. Y. S. Han Cyclic codes 7 • There are total of 2k code polynomials in C, 2n−r = 2k , i.e., r = n − k. • • The polynomial g(x) is called the generator polynomial of the code. • The degree of g(x) is equal toi the number of parity-check digits of the code. • The generator polynomial g(x) of an (n, k) cyclic code is a factor of xn + 1. Proof: We have xk g(x) = (xn + 1) + g(k) (x). Since g(k) (x) is the code polynomial obtained by shifting g(x) to Graduate Institute of Communication Engineering, National Taipei University
  • 9. Y. S. Han Cyclic codes 8 the right cyclically k times, g(k) (x) is a multiple of g(x). Hence, xn + 1 = {xk + a(x)}g(x). • If g(x) is a polynomial of degree n − k and is a factor of xn + 1, then g(x) generates an (n, k) cyclic code. Proof: A linear combination of g(x), xg(x), . . . , xk−1 g(x), v(x) = a0g(x) + a1xg(x) + · · · + ak−1xk−1 g(x) = (a0 + a1x + · · · + ak−1xk−1 )g(x), is a polynomial of degree n − 1 or less and is a multiple of g(x). There are a total of 2k such polynomial and they form an (n, k) linear code. Let v(x) = v0 + v1x + · · · + vn−1xn−1 be a code polynomial in Graduate Institute of Communication Engineering, National Taipei University
  • 10. Y. S. Han Cyclic codes 9 this code. We have xv(x) = v0x + v1x2 + · · · + vn−1xn = vn−1(xn + 1) + (vn−1 + v0x + · · · + vn−2xn−1 ) = vn−1 (xn + 1) + v(1) (x). Since both xv(x) and xn + 1 are divisible by g(x), v(1) must be divisible by g(x). Hence, v(1) (x) is a code polynomial and the code generated by g(x) is a cyclic code. • Suppose that the message to be encoded is u = (u0, u1, . . . , uk−1). Then xn−k u(x) = u0xn−k + u1xn−k+1 + · · · + uk−1xn−1 . Dividing xn−k u(x) by g(x), we have xn−k u(x) = a(x)g(x) + b(x). Graduate Institute of Communication Engineering, National Taipei University
  • 11. Y. S. Han Cyclic codes 10 Since the degree of g(x) is n − k, the degree of b(x) must be n − k − 1 or less. Then b(x) + xn−k u(x) = a(x)g(x) is a multiple of g(x) and therefore it is a code polynomial. b(x) + xn−k u(x) = b0 + b1x + · · · + bn−k−1xn−k−1 +u0xn−k + u1xn−k+1 + · · · + uk−1xn−1 then corresponds to the code vector (b0, b1, . . . , bn−k−1, u0, u1, . . . , uk−1). Graduate Institute of Communication Engineering, National Taipei University
  • 12. Y. S. Han Cyclic codes 11 A (7, 4) Cyclic Code Gnerated by g(x) = 1 + x + x3 Graduate Institute of Communication Engineering, National Taipei University
  • 13. Y. S. Han Cyclic codes 12 Generator and Parity-Check Matrices • The generator matrix of an (n, k) code C is as follows: G =                g0 g1 g2 · · · · · gn−k 0 0 0 · · 0 0 g0 g1 g2 · · · · · gn−k 0 0 · · 0 0 0 g0 g1 g2 · · · · · gn−k 0 · · 0 · · · · · · 0 0 · · · 0 g0 g1 g2 · · · · · gn−k                • In general, G is not in systematic form. However, it can be put into systematic form with row operation. • Let xn + 1 = g(x)h(x), where the polynomial h(x) has the degree k and is of the following form: h(x) = h0 + h1x + · · · + hkxk Graduate Institute of Communication Engineering, National Taipei University
  • 14. Y. S. Han Cyclic codes 13 with h0 = hk = 1. • A parity-check matrix of C may be obtained from h(x). • Let v be a code vector in C and v(x) = a(x)g(x). Then v(x)h(x) = a(x)g(x)h(x) = a(x)(xn + 1) = a(x) + xn a(x). Since the degree of a(x) is k − 1 or less, the powers xk , xk+1 , . . . , xn−1 do not appear in a(x) + xn a(x). Therefore, k i=0 hivn−i−j = 0 for 1 ≤ j ≤ n − k. We take the reciprocal of h(x), xk h(x−1 ) = hk + hk−1x + hk−2x2 + · · · + h0xk , Graduate Institute of Communication Engineering, National Taipei University
  • 15. Y. S. Han Cyclic codes 14 and can see that xk h(x−1 ) is also a factor of xn + 1. xk h(x−1 ) then generates an (n, n − k) cyclic code with the following (n − k) × n matrix as a generator matrix: H =                hk hk−1 hk−2 · · · · h0 0 0 · · 0 0 hk hk−1 hk−2 · · · · h0 0 · · 0 0 0 hk hk−1 · · · · · h0 · · 0 · · · · · · 0 0 · · 0 hk hk−1 hk−2 · · · · h0                Then H is a parity-check matrix of the cyclic code C. We call h(x) the parity polynomial of C. • Let C be an (n, k) cyclic code with generator polynomial g(x). The dual code of C is also cyclic and is generated by the polynomial xk h(x−1 ), where h(x) = (xn + 1)/g(x). • Let xn−k−1 = ai(x)g(x) + bi(x) for 0 ≤ i ≤ k − 1, Graduate Institute of Communication Engineering, National Taipei University
  • 16. Y. S. Han Cyclic codes 15 where bi(x) = bi0 + bi1 + · · · + bi(n−k−1). Since bi(x) + xn−k+i are multiples of g(x), they are code polynomials. Then G =              b00 b01 b02 · · · b0(n−k−1) 1 0 0 · · · 0 b10 b11 b12 · · · b1(n−k−1) 0 1 0 · · · 0 b20 b21 b22 · · · b2(n−k−1) 0 1 · · · 0 . . . . . . . . . b(k−1)0 b(k−1)1 b(k−1)2 · · · b(k−1)(n−k−1) 0 0 0 · · · 1              . • The corresponding parity-check matrix for C is H =              1 0 0 · · · 0 b00 b10 b20 · · · b(k−1)0 0 1 0 · · · 0 b01 b11 b21 · · · b(k−1)1 0 0 1 · · · 0 b02 b12 b22 · · · b(k−1)2 . . . . . . . . . 0 0 0 · · · 1 b0(n−k−1) b1(n−k−1) b2(n−k−1) · · · b(k−1)(n−k−1)              . Graduate Institute of Communication Engineering, National Taipei University
  • 17. Y. S. Han Cyclic codes 16 Encoding of Cyclic Codes • Encoding process: (1) Multiply u(x) by xn−k ; (2) divide xn−k u(x) by g(x); (3) form the code word b(x) + xn−k u(x). ( ) ( ) ( ) n-k stage … Message Xn-ku(X) Code word Parity-check digits g1 g2 gn-k-1 Gate bn-k-1 b2 b1 b0 • Graduate Institute of Communication Engineering, National Taipei University
  • 18. Y. S. Han Cyclic codes 17 Example • Consider the (7, 4) cyclic code generated by g(x) = 1 + x + x3 . Suppose that the message u = (1 0 1 1) is to be encoded. The contentents in the register are as follows: Input Register contents 0 0 0 (initial state) 1 1 1 0 (first shift) 1 1 0 1 (second shift) 0 1 0 0 (third shift) 1 1 0 0 (fourth shift) After four shifts, the contents of the register are (1 0 0). Thus the complete code vector is (1 0 0 1 0 1 1). (1 0 1 1) Message Xn-ku(X) Code word Gate Parity digits Graduate Institute of Communication Engineering, National Taipei University
  • 19. Y. S. Han Cyclic codes 18 Encoding by Parity Polynomial • Since hk = 1, we have vn−k−j = k−1 i=0 hivn−i−j for 1 ≤ j ≤ n − k, which is known as a difference equation. vn−k−1 = h0vn−1+h1vn−2+· · ·+hk−1vn−k = uk−1+h1uk−2+· · ·+hk−1u0 vn−k−2 = uk−2 + h1uk−3 + · · · + hk−1vn−k−1 • Encoding circuit: Gate2 Gate1 u0 u1 Uk-2 Uk-1 • • • • • • h1 h2 hk-2 hk-1 + + + + k stage ° Output to channel Graduate Institute of Communication Engineering, National Taipei University
  • 20. Y. S. Han Cyclic codes 19 Example • The parity polynomial of the (7, 4) cyclic code generated by g(x) = 1 + x + x3 is h(x) = x7 + 1 1 + x + x3 = 1 + x + x2 + x4 . The encoding circuit: h0 = 1 Gate 2 Gate 1 p Output Input Suppose that the message to be encoded is (1 0 1 1). Then v3 = 1, v4 = 0, v5 = 1, v6 = 1. The parity-check digits are v2 = v6 + v3 + v4 = 1 + 1 + 0 = 0 v1 = v5 + v4 + v3 = 1 + 0 + 1 = 0 Graduate Institute of Communication Engineering, National Taipei University
  • 21. Y. S. Han Cyclic codes 20 v0 = v4 + v3 + v2 = 0 + 1 + 0 = 1. The code vector that corresponds to the message (1 0 1 1) is (1 0 0 1 0 1 1). Graduate Institute of Communication Engineering, National Taipei University
  • 22. Y. S. Han Cyclic codes 21 Syndrome Computation • Let r = (r0, r1, . . . , rn−1) be the received vector. The syndrome is calculated as s = r · HT , where H is the parity-check matrix. • If syndrome is not identical to zero, r is not a code vector and the presence of errors has been detected. • Dividing r(x) by the generator polynomial g(x), we obtain r(x) = a(x)g(x) + s(x). • The n − k coefficients of s(x) form the syndrome s. We call s(x) the syndrome. r(x)/g(x) g1 s0 s1 … Gate g2 gn-k-1 sn-k-1 r(X) Received vector Graduate Institute of Communication Engineering, National Taipei University
  • 23. Y. S. Han Cyclic codes 22 • If C is a systematic code, then the syndrome is simply the vector sum of the received parity digits and the parity-check digits recomputed from the received information digits. • Let s(x) be the syndrome of a received polynomial r(x). Then the remainder s(1) (x) resulting from dividing xs(x) by the generator polynomial g(x) is the syndrome of r(1) (x), which is a cyclic shift of r(x). Proof: We have xr(x) = rn−1(xn + 1) + r(1) (x). Then c(x)g(x) + ρ(x) = rn−1g(x)h(x) + x[a(x)g(x) + s(x)], where ρ(x) is the remainder resulting from dividing r(1) (x) by g(x). Then ρ(x) is the syndrome of r(1) (x). Rearranging the Graduate Institute of Communication Engineering, National Taipei University
  • 24. Y. S. Han Cyclic codes 23 above equation, we have xs(x) = [c(x) + rn−1h(x) + xa(x)]g(x) + ρ(x). It is clearly that ρ(x) is also the remainder resulting from dividing xs(x) by g(x). Therefore, ρ(x) = s(1) (x). • The remainder s(i) (x) resulting from dividing xi s(x) be the generator polynomial g(x) is the syndrome of r(i) (x), which is the ith cyclic shift of r(x). Graduate Institute of Communication Engineering, National Taipei University
  • 25. Y. S. Han Cyclic codes 24 Example Consider the (7, 4) cyclic code generated by g(x) = 1 + x + x3 . Suppose that the received vector is r = (0 0 1 0 1 1 0). The syndrome of r is s = (1 0 1). As the received vector is shifted into the circuit, the contents in the register are as follows: 1 0 Gate 1 Gate input If the register is shifted once more with the input gate disabled, the new contents will be s(1) = (1 0 0), which is the syndrome of r(1) = (0 0 0 1 0 1 1). Graduate Institute of Communication Engineering, National Taipei University
  • 26. Y. S. Han Cyclic codes 25 • We may shift the received vector r(x) into the syndrome register from the right end. However, after the entire r(x) has been shifted into the register, the contents in the register do not form the sybdrome of r(x); rather, they form the syndrome s(n−k) (x) of r(n−k) (x). g1 s0 s1 … Gate g2 gn-k-1 sn-k-1 r(X) Received vector xn-kr(x)/g(x) Proof: We have xn−k r(x) = a(x)g(x) + ρ(x). Graduate Institute of Communication Engineering, National Taipei University
  • 27. Y. S. Han Cyclic codes 26 It is known that xn−k r(x) = b(x)(xn + 1) + r(n−k) (x). Hence, r(n−k) (x) = [b(x)h(x) + a(x)]g(x) + ρ(x). When r(n−k) (x) is divided by g(x), ρ(x) is also the remainder. Therefore, ρ(x) is indeed the syndrome of r(n−k) (x). Graduate Institute of Communication Engineering, National Taipei University
  • 28. Y. S. Han Cyclic codes 27 Error Detection • Let v(x) be the transmitted code word and e(x) = e0 + e1x + · · · + en−1xn−1 be the error pattern. Then r(x) = v(x) + e(x) = b(x)g(x) + e(x). • Following the definition of syndrome, we have e(x) = [a(x) + b(x)]g(x) + s(x). This shows that the syndrome is actually equal to the remainder resulting from dividing the error pattern by the generator polynomial. • The decoder has to estimate e(x) based on the syndrome s(x). • If e(x) is identical to a code vector, e(x) is an undetectable error pattern. Graduate Institute of Communication Engineering, National Taipei University
  • 29. Y. S. Han Cyclic codes 28 • The error-detection circuit is simply a syndrome circuit with an OR gate with the syndrome digits as inputs. • For a cyclic code, an error pattern with errors confined to i high-order positions and − i low-order positions is also regarded as a burst of length or less. such a burst is called end-around burst. • An (n, k) cyclic code is capable of detecting any error burst of length n − k or less, including the end-around bursts. Proof: Suppose that the error pattern is a burst of length of n − k or less. Then e(x) = xj B(x), where 0 ≤ j ≤ n − 1 and B(x) is a polynomial of degree n − k − 1 or less. Since the degree of B(x) is less than that of g(x), B(x) is not divisible by g(x). Since g(x) is a factor of Graduate Institute of Communication Engineering, National Taipei University
  • 30. Y. S. Han Cyclic codes 29 xn + 1 and x is not a factor of g(x), g(x) and xj must be relatively prime. Therefore, e(x) is not divisible by g(x). The last part of the above statement is left as an exercise. • The fraction of undetectable bursts of length n − k + 1 is 2−(n−k−1) . Proof: Consider the bursts of length n − k + 1 starting from the ith digit position and ending at the (i + n − k)th digit position. There are 2n−k−1 such burst. Among these bursts, the only one that cannot be detected is e(x) = xi g(x). Therefore, the fraction of undetectable bursts of length n − k + 1 starting from the ith digit position is 2−(n−k−1) . • For n − k + 1, the fraction of undetectable error bursts of length is 2−(n−k) . The proof is left as an exercise. Graduate Institute of Communication Engineering, National Taipei University
  • 31. Y. S. Han Cyclic codes 30 Decoding of Cyclic Codes • Decoding of linear codes consists of three steps: (1) syndrome computation; (2) association of the syndrome to an error pattern; (3) error correction. • The cyclic structure structure of a cyclic code allows us to decode a received vector r(x) in serial manner. • The received digits are decoded one at a time and each digit is decoded with the same circuitry. • The decoding circuit checks whether the syndrome ß(x) corresponds to a correctable error pattern e(x) with an error at the highest-order position xn−1 (i.e., en−1 = 1). • If ß(x) does not correspond to an error pattern with en−1 = 1, the received polynomial and the syndrome register are cyclically shifted once simultaneously. By doing this, we have r(1) (x) and Graduate Institute of Communication Engineering, National Taipei University
  • 32. Y. S. Han Cyclic codes 31 s(1) (x). • The second digit rn−2 of r(x) becomes the first digit of r(1) (x). The same decoding processes. • If the syndrome s(x) of r(x) does correspond to an error pattern with an error at the location xn−1 , the first received digit rn−1 is an erroneous digit and it must be corrected by taking the sum rn−1 ⊕ en−1. • This correction results in a modified received polynomial, denoted by r1(x) = r0 + r1x + · · · + rn−2xn−2 + (rn−1 ⊕ en−1)xn−1 . • The effect of the error digit en−1 on the syndrome can be achieved by adding the syndrome of e (x) = xn−1 to s(x). • The syndrome s (1) 1 of r (1) 1 (x) is the remainder resulting from dividing x[s(x) + xn−1 ] by the generator polynomial g(x). Graduate Institute of Communication Engineering, National Taipei University
  • 33. Y. S. Han Cyclic codes 32 • Since the remainders resulting from dividing xs(x) and xn by g(x) are s(1) (x) and 1, respectively, we have s (1) 1 (x) = s(1)(x) + 1. Graduate Institute of Communication Engineering, National Taipei University
  • 34. Y. S. Han Cyclic codes 33 Meggitt Decoder I Gate Gate Gate Gate Gate Buffer registers Syndrome register Error pattern detection circuit Syndrome modification r(X) Received vector Corrected vector Feedback connection ri ei s(x) --- r(x) s(1)(x) --- r(1)(x) (r0, r1, … , rn-1) = Graduate Institute of Communication Engineering, National Taipei University
  • 35. Y. S. Han Cyclic codes 34 Example Consider the decoding of the (7, 4) cyclic code generated by g(x) = 1 + x + x3 . This code has minimum distance 3 and is capable of correcting any single error. The seven single-error patterns and their corresponding syndromes are as follows: (1 0 1) (1 1 1) (0 1 1) (1 1 0) (0 0 1) (0 1 0) (1 0 0) s(X) = 1 + X2 s(X) = 1 + X + X2 s(X) = X + X2 s(X) = 1 + X s(X) = X2 s(X) = X s(X) = 1 e6(X) = X6 e5(X) = X5 e4(X) = X4 e3(X) = X3 e2(X) = X2 e1(X) = X1 e0(X) = X0 Syndrome vector (s0, s1, s2) Syndrome s(X) Error pattern e(X) Suppose that the code vector v = (1 0 1 1 0 1 1) is transmitted and r = (1 0 1 1 0 1 1). Graduate Institute of Communication Engineering, National Taipei University
  • 36. Y. S. Han Cyclic codes 35 Gate Gate Gate Multiplexer 0 1 0 r(X) Input Buffer register r’(X) Output Graduate Institute of Communication Engineering, National Taipei University
  • 37. Y. S. Han Cyclic codes 36 1 0 1 1 0 1 1 0 1 1 1 0 1 1 0 0 1 1 0 1 1 0 1 0 0 1 1 1 0 1 1 0 0 0 1 0 1 1 1 1 0 1 1 1 Initial 1st shift 2st shift 3rd shift Syndrome register Buffer register Pointer Correction Graduate Institute of Communication Engineering, National Taipei University
  • 38. Y. S. Han Cyclic codes 37 0 0 0 1 1 1 1 0 1 0 1 1 1 1 0 1 0 1 1 0 1 0 1 0 Error corrected 1 0 1 0 0 1 1 0 Corrected word 1 0 1 0 0 0 0 0 0 0 0 0 4th shift 5th shift 6th shift 7th shift Graduate Institute of Communication Engineering, National Taipei University
  • 39. Y. S. Han Cyclic codes 38 Meggitt Decoder II • To decode a cyclic code, the received polynomial r(x) may be shifted into the syndrome register from the right end for computing the syndrome. • When r(x) has been shifted into the syndrome register, the register contains s(n−k) (x), which is the syndrome of r(n−k) (x). If s(n−k) (x) corresponds to an error pattern e(x) with en−1 = 1, the highest-order digit rn−1 of r(x) is erroneous and must be corrected. • In r(n−k) (x), the digit rn−1 is at the location xn−k−1 . When rn−1 is corrected, the error effect must be removed from s(n−k) (x). • The new syndrome s (n−k) 1 (x) is the sum of s(n−k) (x) and the remainder ρ(x) resulting from dividing xn−k−1 by g(x). Since Graduate Institute of Communication Engineering, National Taipei University
  • 40. Y. S. Han Cyclic codes 39 the degree of xn−k−1 is less than the degree of g(x), s (n−k) 1 (x) = s(n−k) (x) + xn−k−1 . Error-pattern detection circuit Syndrome register Buffer register r(X) Gate Gate Gate Gate Gate r(X) Corrected vector Received vector Feedback connection ri ei (Syndrome modification) (r0, r1, … ,rn-1) = Graduate Institute of Communication Engineering, National Taipei University
  • 41. Y. S. Han Cyclic codes 40 Example Again, we consider the decoding of the (7, 4) cyclic code generated by g(X) = 1 + X + X3 . Suppose that the received polynomial r(X) is shifted into the syndrome register from the right end. The seven single-error patterns and their corresponding syndromes are as follows: (0 0 1) (0 1 0) (1 0 0) (1 0 1) (1 1 1) (0 1 1) (1 1 0) s(3)(X) = X2 s(3)(X) = X s(3)(X) = 1 s(3)(X) = 1 + X2 s(3)(X) = 1 + X + X2 s(3)(X) = X + X2 s(3)(X) = 1 + X e(X) = X6 e(X) = X5 e(X) = X4 e(X) = X3 e(X) = X2 e(X) = X1 e(X) = X0 Syndrome vector (s0, s1, s2) Syndrome s(3)(X) Error pattern e(X) We see that only when e(X) = X6 occurs, the syndrome is (0 0 1) Graduate Institute of Communication Engineering, National Taipei University
  • 42. Y. S. Han Cyclic codes 41 after the entire received polynomial r(X) has been shifted into the syndrome register. If the single error occurs at the location Xi with i = 6, the syndrome in the register will not be (0 0 1) after the entire received polynomial r(X) has been shifted into the syndrome register. However, another 6i shifts, the syndrome register will contain (0 0 1). Based on this fact, we obtain another decoding circuit for the (7, 4) cyclic code generated by g(X) = 1 + X + X3 . Graduate Institute of Communication Engineering, National Taipei University
  • 43. Y. S. Han Cyclic codes 42 Gate Gate Gate Multiplexer r(X) Input Buffer register r’(X) Output Graduate Institute of Communication Engineering, National Taipei University