0% found this document useful (0 votes)
76 views5 pages

Cyclic Code

1) Cyclic codes can be represented by a cyclic generator matrix where each successive row is a cyclic shift of the previous row. 2) Encoding a message involves multiplying the message by the generator matrix to produce the codeword. 3) At the receiver, the syndrome is computed by multiplying the received vector by the parity check matrix to determine the error location. 4) The minimum distance of a code determines its error correction capability, with the capability equal to the largest number of errors that can be corrected, defined as the floor of (minimum distance - 1)/2.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views5 pages

Cyclic Code

1) Cyclic codes can be represented by a cyclic generator matrix where each successive row is a cyclic shift of the previous row. 2) Encoding a message involves multiplying the message by the generator matrix to produce the codeword. 3) At the receiver, the syndrome is computed by multiplying the received vector by the parity check matrix to determine the error location. 4) The minimum distance of a code determines its error correction capability, with the capability equal to the largest number of errors that can be corrected, defined as the floor of (minimum distance - 1)/2.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Cyclic code

For cyclic code, the generator polynomial can be easily transformed to generator
matrix, as follows

g 0 g1 ...
0 g 0 g1

G= M
M O

M O
M
0
0 ...

... ... ... gr 1


gr
0 0
... ... ...
...
gr 1 gr 0
O O O
O
O
O O
O O O
O
O
O O
0

g 0 g1

...

...

...

...

gr 1 gr
...
...
O
O

0
0
M
M

(1)

The matrix G has n columns and k=n-r rows; so the first row g0 finishes with a string of 1s
of length k-1. Each successive row is the cyclic shift of the previous row: gi=gi-1 for
i=1,..,k-1. If C is a [7,4] binary cyclic code with generator polynomial 1+x+x3, the the
cyclic generator matrix is

1
0
G=
0

1
1
0
0

0
1
1
0

1
0
1
1

0
1
0
1

0
0
1
0

0
0
.
0

(2)

Given the cyclic generator matrix G, cyclic encoding is the process of encoding the
message into the codeword c=mG. For systematic cyclic code, the first k positions of
codeword are same with m message before added with CRC bits. To construct the
systematic generator matrix, encode the messages of weight 1 corresponding to
message polynomial. Proceeding in this way, the generator matrix is

1
0
G=
0

0 0 0 1 0 1
1 0 0 1 1 1
.
0 1 0 1 1 0

0 0 1 0 1 1

(3)

The codeword for m message is


c=mG

(4)

1
0
[c6 c5 c 4 c3 c 2 c1 c0] = [m3 m2 m1 m0]
0

0 0 0 1 0 1
1 0 0 1 1 1 (5)
.
0 1 0 1 1 0

0 0 1 0 1 1

By using equation (5), the codewords for corresponding messages are


Table 1: Messages and Codewords
Messages

Codewords

0000

0000000

1000

1000101

0100

0100111

1100

1100010

0010

0010110

1010

1010011

0110

0110001

1110

1110100

0001

0001011

1001

1001110

0101

0101100

1101

1101001

0011

0011101

1011

1011000

0111

0111010

1111

1111111

At receiver end, the decoder computes the following (n-k) syndrome, s.


s=r.HT

(6)

where r is a received vector that was transmitted over noisy channel and HT is parity
check matrix. For (7,4) linear code, the corresponding parity check matrix is

1 1 1 0 1 0 0
H = 0 1 1 1 0 1 0 .
1 1 0 1 0 0 1

(7)

Usually, received vector r, is the vector sum of the transmitted codeword and the error
vector, that is
r=c +e

[r 6

(8)

r 5 r 4 r 3 r 2 r1 r 0] = [c6 c5 c 4 c3 c 2 c1 c0] [e6 e5 e4 e3 e2 e1 e0]

(9)

The syndrome, s will determine the error position and can be computed as follows
s=e.HT

1
1

1
[s 2 s1 s0] = [e6 e5 e4 e3 e2 e1 e0] 0
1

0
0

(10)

0
1
1
1
0
1
0

1
1
0

1 .
0

0
1

(11)

From equation (11), the syndromes for corresponding error locations are
Table 2: Errors and syndromes
Errors

Syndromes

1000000

101

0100000

111

0010000

110

0001000

011

0000100

100

0000010

010

0000001

001

0000000

000

Let c = [1010011] be the transmitted codeword and r=[1010011] be the received


vector. Since the received vector is same with the transmitted vector, it means there is
no error and the syndrome
s=e.HT = (000)

(12)

Next, let say the error vector e=[1000000], the received vector is
r= c+e = [0010011]

(13)

From the received vector, the syndrome is


s=e.HT = (101)

(14)

and from Table 2, the error vector, e =[1000000].


The actual transmitted codeword
c* = r + e = 00100101 + 1000000 = 1010011

(15)

After decoding, found that c*=c with message, m=[1010]. Hence the receiver has
performed a correct decoding.

Hamming Distance and Minimum Distance


Hamming Distance is a weight between 2 codewords for corresponding cyclic code.
For Hamming code, the Hamming distance between codewords, [1000110] and
[0100011] is

1 0 0 0 1 1 0
0 1 0 0 0 1 1

(16)

1 1 0 0 1 0 1 Hamming weight is 4
Hamming distance between each codewords might be different and the smallest
distance is called minimum distance. From the minimum distance, error correction
capability is determined as follows
d=2t+1
where t is error correction capability and d is minimum distance.

(17)

You might also like