0% found this document useful (0 votes)
31 views

Module 4 Error Control Coding

Uploaded by

rakshanjingade95
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)
31 views

Module 4 Error Control Coding

Uploaded by

rakshanjingade95
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/ 17

0.1.

Cyclic Codes

0.1 Cyclic Codes


A binary code is said to be a cyclic code if it exhibits two fundamental properties:

1. Linearity Property: The sum of any two codewords in the code is also a codeword.

2. Cyclic Property: Any cyclic shift of a codeword in the code is also a codeword.

If c0 , c1 , . . . cn−1 , of a codeword then

c0 , c1 , c2 , . . . cn−2 , cn−1
cn−1 , c0 , c1 , . . . cn−3 , cn−2
cn−2 , cn−1 c0 , . . . cn−4 , cn−3
c0 , c1 , c2 , . . . cn−2 , cn−1

are all codeword

Code Polynomial
Let u = (1 0 1 0) be the message vector, then the corresponding message polynomial is u(X) = 1 + X 2 .
Let the generator polynomial is g(X) = 1 + X + X 3 .
Let c0 , c1 , , c2 . . . cn−1 , be the code C. The code polynomial of C is:

c(X) = c0 + c1 X + c2 X 2 , . . . cn−1 X n−1

where the power of X corresponds to the bit position, and the coefficients are 0s and 1s
Multiplying u(X) by g(X) results in the following code polynomial :

c(X) = u(X) × g(X)


= (1 + X 2 )(1 + X + X 3 ) = 1 + X + X 2 + X 5

The code vector is (1 1 1 0 0 1 0)

Table 1: (7,4) cyclic code generated by g(x) = 1 + X + X 3

Messages Code Code


Vectors Polynomials
(0000) (0000000) 0=0.g(x)
(1000) (1101000) 1 + X + X 3 = 1.g(x)
(0100) (0110100) X + X 2 + X 4 = X.g(x)
(1100) (1011100) 1 + X 2 + X 3 + X 4 = (1 + X).g(x)
(0010) (0011010) X 2 + X 3 + X 5 = X 2 .g(x)
(1010) (1110010) 1 + X + X 2 + X 5 = (1 + X 2 ).g(x)
(0110) (0101110) X + X 3 + X 4 + X 5 = (X + X 2 ).g(x)
(1110) (1000110) 1 + X 4 + X 5 = (1 + X + X 2 ).g(x)
(0001) (0001101) X 3 + X 4 + X 6 = X 3 .g(x)
(1001) (1100101) 1 + X + X 4 + X 6 = (1 + X 3 ).g(x)
(0101) (0111001) X + X 2 + X 3 + X 6 = (X + X 3 ).g(x)
(1101) (1010001) 1 + X 2 + X 6 = (1 + X + X 3 ).g(x)
(0011) (0010111) X 2 + X 4 + X 5 + X 6 = (X 2 + X 3 ).g(x)
(1011) (1111111) 1 + X + X 2 + X 3 + X 4 + X 5 + X 6 = (1 + X 2 + X 3 ).g(x)
(0111) (0100011) X + X 5 + X 6 = (X + X 2 + X 3 ).g(x)
(1111) (1001011) 1 + X 3 + X 5 + X 6 = (1 + X + X 2 + X 3 ).g(x)

Dr. Manjunatha P Prof., Dept of ECE, JNN College of Engg Shimoga manjup.jnnce@gmail.com 1
0.1. Cyclic Codes

• Encoding in systematic form consists of three steps:

1. Step 1 Pre-multiply the message u(X) by X n−k


2. Step 2 Obtain the remainder b(X) from dividing X n−k u(X) by the generator polynomial g(X)
3. Step 3 Combine b(X) and X n−k u(X) to obtain the code polynomial b(X) + X n−k u(X)

• Consider the (7, 4) cyclic code generated by g(X) = 1 + X + X 3

• Let u(X) = 1 + X 3 be the message to be encoded.

• Pre-multiply the message u(X) = 1 + X 3 by X n−k =(1 + X 3 )(X 3 ) = X 3 + X 6

• Dividing X 3 u(X) = X 3 + X 6 by g(X)

• we obtain the remainder b(X) = X + X 2

• The code polynomial is v(X) = b(X) + X 3 u(X) = X + X 2 + X 3 + X 6

• The corresponding code vector is v = (0 1 1 1 0 0 1)

x3 + x
x3 + x + 1)x6 x3
x6 + x4 + x3
.........................................................
x4
x4 + x2 + x
.........................................................
x2 + x

• Consider an (n, k) cyclic code C with generator polynomial

g(X) = g0 + g1 X + . . . + gn−k X n−k (1)

• The k code polynomials g(X), Xg(X), . . . , X k−1 g(X) span C

• If the n-tuples corresponding to these k code polynomials are used as the rows of an k x n matrix,
then the generator matrix G is:
 
g0 g1 g2 . . . . gn−k 0 0 0 . . 0
 0 g0 g1 g2 . . . . gn−k 0 0 . . 0 
 
G =  0 0 g0 g1 g2 . . . . gn−k 0 . . 0
 

 .. 
 . 
0 0 . . . 0 g0 g1 g2 . . . . gn−k
Note: g0 = gn−k = 1
 
1 1 0 1 0 0 0
0 1 1 0 1 0 0 
G0 = 


 0 0 1 1 0 1 0 
0 0 0 1 1 0 1
The generator matrix G0 constructed is not in systematic form. This can be changed into We into a
systematic form by adding the first row to the third row, and adding the sum of the first two rows
to the fourth row.
 
1 1 0 1 0 0 0
 0 1 1 0 1 0 0 
G=  1 1 1 0 0 1 0 

1 0 1 0 0 0 1

Dr. Manjunatha P Prof., Dept of ECE, JNN College of Engg Shimoga manjup.jnnce@gmail.com 2
0.1. Cyclic Codes

These manipulations result in the desired generator matrix:

Encoding operation using generator polynomial:

• Encoding of an (n, k) cyclic code in systematic form consists of three steps:

1. Multiply the message polynomial u(X) by X n−k


2. Divide X n−k u(X) by g(X) to obtain the remainder b(X)
3. Form the code word b(X) + X n−k u(X)

• All these three steps can be accomplished with a division circuit which is a linear (n-k)-stage shift
register with feedback connections based on the generator polynomial

g(X) = 1 + g1 X + g2 X 2 + . . . + gn−k−1 X n−k−1 + X n−k (2)

Gate
Enable
g0=1 g1 g2 gn-k-1

R0 + R1 + R2 + Rn-k-1 +
Flip-flop
Parity
Modulo-2
adder
check digits

Message X n  k u ( X ) To channel

Figure 1: Encoding circuit for an (n,k) cyclic code

Encoding operation is as follows:


Step 1

• With the gate turned on, the k information digits u0 , u1 , . . . , uk−1 are shifted into the circuit and
simultaneously into the communication channel

• Shifting the message u(X) into the circuit from the front end is equivalent to premultiplying u(X)
by X n−k

• As soon as the complete message has entered the circuit, the n - k digits in the register form the
remainder and thus they are the parity-check digits.
Step 2

• Break the feedback connection by turning off the gate.


Step 3

• Shift the parity-check digits out and send them into the channel

• These n-k parity-check digits b0 , b1 , . . . , bn−k−1 , together with the k information digits, form a
complete code vector

Dr. Manjunatha P Prof., Dept of ECE, JNN College of Engg Shimoga manjup.jnnce@gmail.com 3
0.1. Cyclic Codes

Example

• Consider the (7, 4) cyclic code generated by g(X) = 1 + X + X 3

• The encoding circuit based on g(X) is shown in Figure 2

• Suppose that the message u = (1 0 1 1) is to be encoded

• As the message digits are shifted into the register, the contents in the register are:

The generator polynomial is

g(X) = 1 + X + X 3
= g0 + g1 X + g2 X 2 + g3 X 3

The generator polynomial coefficients are


g0 = 1, g1 = 1, g2 = 0

Enable

Gate

g0=1 g1=1 g2=0

Code
word
R0 + R1 R2 +

g( X )  1 X  X 3
Message 1011

Parity Check
digits

Figure 2: Encoder for the (7,4) cyclic code generated by g(X) = 1 + X + X 3

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 shift, the contents of the register are (1 0 0) and the codeword is (1 0 0 1 0 1 1)

Dr. Manjunatha P Prof., Dept of ECE, JNN College of Engg Shimoga manjup.jnnce@gmail.com 4
0.1. Cyclic Codes

Syndrome Computation and Error Detection


• Let r = (r0 , r1 , . . . , rn−1 ) be the received vector and due to the channel noise, the received vector
may not be the same as the transmitted code vector

• In the decoding of a linear code, the first step is to compute the syndrome s = r.H T , where H is the
parity check matrix

• If the syndrome is zero, r is a code vector and decoder accepts r as the transmitted code vector

• If the syndrome 6= 0 r is not a code vector and the presence of errors has been detected

• The received vector r is treated as a polynomial of degree n-1, or less,

r(X) = r0 + r1 X + . . . + rn−1 X n−1

• Dividing r(X) by the generator polynomial g(X), we obtain

r(X) = a(X)g(X) + s(X)

• The remainder s(X) is a polynomial of degree n-k-1 or less

• The n - k coefficients of s(X) form the syndrome s

• s(X) is identical to zero if and only if the received polynomial r(X) is a code polynomial.

• The syndrome computation can be accomplished with a division circuit as shown in Figure 3

Gate
Enable
g0=1 g1 g2 g n  k 1
r(x)
+ S0 + S1 + + Sn-k-1
Received Flip-flop Syndrome
vector Modulo-2
adder

Figure 3: Syndrome calculator for the (n,k)

Example

• A syndrome circuit for the (7, 4) cyclic code g(X) = 1 + X + X 3 is shown in Fig. 5.6

• 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 given in Table 5.3

• At the end of the seventh shift, the register contains the syndrome s = (1 0 1)

• If the register is shifted once more with the input gate disabled, the new contents will be s(1) (X) =
(1 0 0), which is the syndrome of r(1) (X) = (0 0 0 1 0 1 1), a cyclic shift of r

 
1 1 0 1 0 0 0
 0 1 1 0 1 0 0 
G=
 1

1 1 0 0 1 0 
1 0 1 0 0 0 1

Dr. Manjunatha P Prof., Dept of ECE, JNN College of Engg Shimoga manjup.jnnce@gmail.com 5
0.1. Cyclic Codes

 
1 0 0 1 0 1 1
H= 0 1 0 1 1 1 0 
0 0 1 0 1 1 1
 
1 0 0
 0 1 0 
 
 0 0 1 
S = r.H T = [0 0 1 0 1 1 0] 
 
 1 1 0  = [1 0 1]

 0 1 1 
 
 1 1 1 
1 0 1

Gate

g0=1 g1=1

Received
bits
+ S0 + S1 S2
Syndrome
Modulo-2 Flip-flop output
g( X )  1 X  X 3
adder

Figure 4: Syndrome calculator for the (7,4) cyclic code generated by g(X) = 1 + X + X 3

Register contents
Shifts Input
S0 S1 S2
Initial state 0 0 0
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

Dr. Manjunatha P Prof., Dept of ECE, JNN College of Engg Shimoga manjup.jnnce@gmail.com 6
0.1. Cyclic Codes

2022 FEB (18EC54) Jan 7 b. Design an encoder for a (7, 4) binary cyclic code generated by g(X) =
1 + X + X 3 and verify its operation using the message vectors (1001) and (1011)

Solution:
The encoder diagram as shown in Figure 5.

Enable
Gate

g0=1 g1=1

R0 + R1 R2 + Code
word
Message Xn-k u(X)

Parity Check
digits

Figure 5: Syndrome calculator for the (7,4) cyclic code generated by g(X) = 1 + X + X 3

Shift Input Register contents


0 0 0 (initial state)
1 1 1 1 0 (first shift)
2 0 0 1 1 (second shift)
3 0 1 1 1 (third shift)
4 1 0 1 1 (fourth shift)

The code vector is 0111001

Shift Input Register contents


0 0 0 (initial state)
1 1 1 1 0 (first shift)
2 0 0 1 1 (second shift)
3 1 0 0 1 (third shift)
4 1 0 0 0 (fourth shift)

The code vector is 0001001

Dr. Manjunatha P Prof., Dept of ECE, JNN College of Engg Shimoga manjup.jnnce@gmail.com 7
0.1. Cyclic Codes

2020 FEB (2017 scheme) Jan 7 c. Design a syndrome calculating circuit for a (7, 4) cyclic code with
g(X) = 1 + X + X 3 and also calculate the syndrome of the received vectors (1110101).

Solution:
The encoder diagram as shown in Figure 5.

Gate
Enable

Received g0=1 g1=1 g2=0


bits Syndrome
+ S0 + S1 S2
output
Modulo-2 Flip-flop
adder

Figure 6: Syndrome calculator for the (7,4) cyclic code generated by g(X) = 1 + X + X 3

The generator polynomial is

g(X) = 1 + X + X 3
= g0 + g1 X + g2 X 2 + g3 X 3

The generator polynomial coefficients are


g0 = 1, g1 = 1, g2 = 0

Register contents
Shifts Input
S0 S1 S2
Initial state 0 0 0
1 1 1 0 0
2 0 0 1 0
3 1 1 0 1
4 0 1 0 0
5 1 1 1 0
6 1 1 1 1
7 1 0 0 1

Dr. Manjunatha P Prof., Dept of ECE, JNN College of Engg Shimoga manjup.jnnce@gmail.com 8
0.1. Cyclic Codes

2001 Consider the (15,11) cyclic code generated by g(X) = 1 + X + X 4

(a) Draw the feedback register encoding circuit for this cyclic code. Find the code vector in systematic
form for the message D(X) = X 2 + X 3 + X 4 .

(b) Illustrate the encoding procedure with the message vector 0 1 1 0 1 0 0 1 0 1 1 by listing the states
of the register with each input.

(c) Verify the code polynomial by using the division method.

Solution:
The encoder diagram as shown in Figure 7.

Gate
Enable

g0=1 g1=1 g2=0 g3=0


R0 + R1 R2 R3 +
Flip-flop
Modulo-2
adder g(X )  1 X  X 4
Message 01101001011 To channel

Figure 7: Syndrome calculator for the (7,4) cyclic code generated by g(X) = 1 + X + X 4

Shift register contents


Number of Shifts Input
R0 R1 R2 R3
Initial state 0 0 0 0
1 1 1 1 0 0
2 1 1 0 1 0
3 0 0 1 0 1
4 1 0 0 1 0
5 0 0 0 0 1
6 0 1 1 0 0
7 1 1 0 1 0
8 0 0 1 0 1
9 1 0 0 1 0
10 1 1 1 0 1
11 0 1 0 1 0

The content of the shift register is 1010 hence the message vector is 1010 0 1 1 0 1 0 0 1 0 1 1

Dr. Manjunatha P Prof., Dept of ECE, JNN College of Engg Shimoga manjup.jnnce@gmail.com 9
0.1. Cyclic Codes

X n−k D(X) = X 4 (X + X 2 + X 4 + X 7 + X 9 + X 10 ) = X 14 + X 13 + X 11 + X 8 + X 6 + X 5

X 4 + X + 1)X 14 + X 13 + X 11 + X 8 + X 6 + X 5 (X 10 + X 9 + X 5 + X 4 + X + 1
- X 14 + X 11 + X 10
- ———————————–
- X 13 + X 10 + X 8 + X 6 + X 5
- X 13 + X 10 + X 9
- ———————————–
- X9 + X8 + X6 + X5
- X9 + X6 + X5
- ———————————–
- X8
- X8 + X5 + X4
- ———————————–
- X5 + X4
- X5 + X2 + X
- ———————————–
- X4 + X2 + X
- X5 + X + 1
- ———————————–
- X2 + 1
- R(X) = 1 + X 2

The code vector polynomial is R(X) + xn−k D(X)

R(X) = 1 + X 2 + X 5 + X 6 + X 8 + X 11 + X 13 + X 14
= [101001101001011]

Dr. Manjunatha P Prof., Dept of ECE, JNN College of Engg Shimoga manjup.jnnce@gmail.com 10
0.1. Cyclic Codes

Consider a (15,11) linear cyclic code has a generator polynomial g(X) = 1 + X + X 4

(i) Draw the the block diagram of the encoder.

(ii) Illustratge the encoder procedure with the message vector 1 1 0 0 1 1 0 1 0 1 1 by listing the states
of the register (the right most bit is the earliest bit ).

Solution:
i) The encoder circuit is.
The generator polynomial is g(X) = 1 + X + X 4 . The coefficients of g are:

g(X) = 1 + X + X 4
= g0 + g1 X + g2 X 2 + g3 X 3 + g4 X 4

The generator polynomial coefficients are


g0 = 1, g1 = 1, g2 = 0, g3 = 0
The encoder circuit is as shown in Figure 8.

Gate
Enable
g0=1 g1=1 g2=0 g3=0
R0 + R1 R2 R3 +
Flip-flop
Modulo-2
adder g(X )  1 X  X 4
Message 11001101011 To channel

Figure 8: (15-11) Cyclic Encoder

Register contents
Shifts Input
R0 R1 R2 R3
Initial state 0 0 0 0
1 1 1 1 0 0
2 1 1 0 1 0
3 0 0 1 0 1
4 1 0 0 1 0
5 0 0 0 0 1
6 1 0 0 0 0
7 1 1 1 0 0
8 0 0 1 1 0
9 0 0 0 1 1
10 1 0 0 0 1
11 1 0 0 0 0

The Code vector is [0 0 0 0 1 1 0 0 1 1 0 1 0 1 1]

Dr. Manjunatha P Prof., Dept of ECE, JNN College of Engg Shimoga manjup.jnnce@gmail.com 11
0.1. Cyclic Codes

A (15,5) linear cyclic code has a generator polynomial g(X) = 1 + X + X 2 + X 4 + X 5 + X 8 + X 10

(i) Draw the the block diagram of the encoder.

(ii) Find the code polynomial for the message D(X) = 1 + X 3 + X 4 by listing the states of the register
with each binary message input.

(iii) Verify the validity of the code vector so formed by using division method.

Solution:
i) The encoder circuit is.
The generator polynomial is g(X) = 1 + X + X 2 + X 4 + X 6 + X 8 + X 10 . The coefficients of g are:
g0 = 1, g1 = 1, g2 = 1, g3 = 0, g4 = 1, g5 = 1, g6 = 0, g7 = 0, g8 = 1, g9 = 0
The syndrome calculation circuit is as shown in Figure 10.

Enable
Gate
g0=1 g1=1 g2=1 g4=1 g5=1 g8=1

R0 + R1 + R2 R3 + R4 + R5 R6 R7 + R8 R9 +

Flip-flop
Modulo-2
adder g ( X )  1  X  X 2  X 4  X 5  X 8  X 10
D( X )  1  X 3  X 4
Message 10011 To
channel

Figure 9: Encoder

Register contents
Shifts Input
R0 R1 R2 R3 R4 R5 R6 R7 R8 R9
Initial state 0 0 0 0 0 0 0 0 0 0
1 1 1 1 1 0 1 1 0 0 1 0
2 1 1 0 0 1 1 0 1 0 1 1
3 0 1 0 1 0 0 0 0 1 1 1
4 0 1 0 1 1 1 1 0 0 0 1
5 1 0 1 0 1 1 1 1 0 0 0

Code vector is 010111100010011


Code polynomial g(X) = X + X 3 + X 4 + X 5 + X 6 + X 10 + X 13 + X 14

Dr. Manjunatha P Prof., Dept of ECE, JNN College of Engg Shimoga manjup.jnnce@gmail.com 12
0.1. Cyclic Codes

X n−k D(X) = X 10 (1 + X 3 + X 4 ) = X 14 + X 13 + X 10

X 10 + X 8 + X 5 + X 4 + X 2 + X + 1)X 14 X 13 + X 10 + (X 4 + X 3 + X 2 + X
- X 14 + X 12 + X 9 + X 8 + X 6 + X 5 + X 4
- ———————————————
- X 13 + X 12 + X 10 + X 9 + X 8 + X 6 + X 5 + X 4
- X 13 + X 11 + X 8 + X 7 + X 5 + X 4 + X 3
- ———————————————
- X 12 + X 11 + X 10 + X 9 + X 7 + X 6 + X 5 + X 3
- X 12 + X 10 + X 7 + X 6 + X 4 + X 3 + X 2
- ———————————————
- X 11 + X 9 + X 4 + X 2
- X 11 + X 9 + X 6 + X 5 + X 3 + X 2 + X
- ———————————————
- X6 + X5 + X4 + X3 + X
- R(X) = X + X + X 4 + X 5 + X 6
3

The code vector polynomial is R(X) + xn−k D(X)

= X + X 3 + X 4 + X 5 + X 6 + X 10 (1 + X 3 + X 4 )
= X + X 3 + X 4 + X 5 + X 6 + X 10 + X 13 + X 14
= [010111100010011]

010111100010011

Dr. Manjunatha P Prof., Dept of ECE, JNN College of Engg Shimoga manjup.jnnce@gmail.com 13
0.1. Cyclic Codes

2023 Jan 18EC54 8a 2001 FEB (2017 scheme) Jan 7 a.The generator polynomial of a (15,7) cyclic code is
g(X) = 1 + X 4 + X 6 + X 7 + X 8
(i) Draw the encoder circuit.
(ii) Obtain the codeword for the input (00111)
(iii) Find the code vector for the message D(X) = X 2 + X 3 + X 4 using encoder circuit.
(iv) Draw the syndrome calculation circuit.
(v) Find the syndrome of the received polynomial Z(X) = 1 + X + X 3 + X 6 + X 8 + X 9 + X 11 + X 14
(vi) Assume that the first and last bits of the code vector V (X) for D(X) = X 2 + X 3 + X 4 suffer
transmission errors. Find the syndrome of V (X).

Solution:
i) The encoder circuit is.
The generator polynomial is g(X) = 1 + X 4 + X 6 + X 7 + X 8 . The coefficients of g are:
g0 = 1, g1 = 0, g2 = 0, g3 = 0, g4 = 1, g5 = 0, g6 = 1, g7 = 1, g8 = 1
The encoder circuit is for the (15,7) cyclic code as shown in Figure 10.

Gate
Enable
g0=1 g4=1 g6=1 g7=1

R0 R1 R2 R3 + R4 R5 + R6 + R7 +
Flip-flop
Modulo-2
g(X )  1 X 4  X 6  X 7  X 8
adder
Message 00111
To channel

Figure 10: Encoder for the (15,7) cyclic code.

Register contents
Shifts Input
R0 R1 R2 R3 R4 R5 R6 R7
Initial state 0 0 0 0 0 0 0 0
1 1 1 0 0 0 1 0 1 1
2 1 0 1 0 0 0 1 0 1
3 1 0 0 1 0 0 0 1 0
4 0 0 0 0 1 0 0 0 1
5 1 1 0 0 0 0 0 1 1

X n−k D(X) = X 8 (X 2 + X 3 + X 4 ) = X 10 + X 11 + X 12

X 8 + X 7 + X 6 + X 4 + 1)X 12 + X 11 + X 10 (+X 4
- X 12 + X 11 + X 10 + X 8 + X 4
- ———————————–
- X8 + X4
- X8 + X7 + X6 + X4 + 1
- ———————————–
- R(X) = 1 + X 6 + X 7

R(X) = 1 + X 6 + X 7 = 1 + (0)X + (0)X 2 + (0)X 3 + (0)X 4 + (0)X 5 + (1)X 6 + (1)X 7


= [10000011]

The code vector V is

[V ] = [R D] = [10000011 0011100]

Dr. Manjunatha P Prof., Dept of ECE, JNN College of Engg Shimoga manjup.jnnce@gmail.com 14
0.1. Cyclic Codes

The syndrome calculation circuit is


The generator polynomial is g(X) = 1 + X 4 + X 6 + X 7 + X 8 . The coefficients of g are:
g0 = 1, g1 = 0, g2 = 0, g3 = 0, g4 = 1, g5 = 0, g6 = 1, g7 = 1, g8 = 1 The syndrome calculation circuit is
as shown in Figure 11.

Gate
Enable
g0=1 g4=1 g6=1 g7=1

S0 S1 S2 S3 + S4 S5 + S6 + S7
Flip-flop Syndrome
g(X )  1 X 4  X 6  X 7  X 8
ZX=110100101101001

Figure 11: Syndrome calculator for the (7,4) cyclic code generated by g(X) = 1 + X 4 + X 6 + X 7 + X 8

Register contents
Shifts Input
S0 S1 S2 S3 S4 S5 S6 S7
Initial state 0 0 0 0 0 0 0 0
1 1 1 0 0 0 0 0 0 0
2 0 0 1 0 0 0 0 0 0
3 0 0 0 1 0 0 0 0 0
4 1 1 0 0 1 0 0 0 0
5 0 0 1 0 0 0 1 0 0
6 1 1 0 1 0 0 1 0 0
7 1 1 1 0 1 0 0 1 0
8 0 0 1 1 0 1 0 0 1
9 1 0 0 1 1 1 1 1 1
10 0 1 0 0 1 0 1 0 0
11 0 0 1 0 0 1 0 1 0
12 1 1 0 1 0 0 1 0 1
13 0 1 1 0 1 1 0 0 1
14 1 0 1 1 0 0 1 1 1
15 1 0 0 1 1 1 0 0 0

Dr. Manjunatha P Prof., Dept of ECE, JNN College of Engg Shimoga manjup.jnnce@gmail.com 15
0.1. Cyclic Codes

The syndrome of the received polynomial for Z(X) = 1 + X + X 3 + X 6 + X 8 + X 9 + X 11 + X 14 is


The syndrome of the received signal Z(X) is obtained as the remainder resulting from division of Z(X)
by g(X) is
X 8 + X 7 + X 6 + X 4 + 1)X 14 + X 11 + X 9 + X 8 + X 6 + X 3 + X + 1(X 6 + X 5 + X 2 + X + 1
- X 14 + X 13 + X 12 + X 10 + X 6
- ———————————–
- X 13 + X 12 + X 11 + X 10 + X 9 + X 8 + X 3 + X + 1
- X 13 + X 12 + X 11 + X 9 + X 5
- ———————————–
- X 10 + X 8 + X 5 + X 3 + X + 1
- X 10 + X 9 + X 8 + X 6 + X 2
- ———————————–
- X9 + X6 + X5 + X3 + X2 + X + 1
- X9 + X8 + X7 + X5 + X
- ———————————–
- X8 + X7 + X6 + X3 + X2 + X + 1
- X8 + X7 + X6 + X4 + 1
- ———————————–
- X4 + X3 + X2

The remainder (syndrome) is S(X) = X 2 + X 3 + X 4


The syndrome vector is (n-k)=15-7=8 bit vector S=[0 0 1 1 1 0 0 0]

vi) When the first and last bits of the code vector V (X) for D(X) = X 2 + X 3 + X 4 suffer
transmission errors then the received code vector is.
The code vector is

[V ] = [100000110011100]

When the first and last bits of the code vector suffer transmission errors then

[Z] = [000000110011101]

Z(X) = X 6 + X 7 + X 10 + X 11 + X 12 + X 14

2003 July 7 b .The generator polynomial of a (15,7) cyclic code is g(X) = 1 + X 4 + X 6 + X 7 + X 8

(ii) Find the code word in systematic form for the message (0 1 0 1 0 1 0) clearly explaining all the steps.
In particular list the state of the registers in each step of code computation.

(ii) Verify your answer by direct hand calculation.

Solution:
i) The encoder circuit is.
The generator polynomial is g(X) = 1 + X 4 + X 6 + X 7 + X 8 . The coefficients of g are:
g0 = 1, g1 = 0, g2 = 0, g3 = 0, g4 = 1, g5 = 0, g6 = 1, g7 = 1, g8 = 1
The encoder circuit is for the (15,7) cyclic code as shown in Figure 10.
From the above table the last row of the table is 0 1 0 1 1 0 0 0 and the vector is
V=[0 1 0 1 1 0 0 0 0 1 0 1 0 1 0]
(ii) Verify your answer by direct hand calculation.
Given data D is [ 0 1 0 1 0 1 0 ] D(X) = X + X 3 + X 5

Dr. Manjunatha P Prof., Dept of ECE, JNN College of Engg Shimoga manjup.jnnce@gmail.com 16
0.1. Cyclic Codes

Gate
Enable
g0=1 g4=1 g6=1 g7=1

R0 R1 R2 R3 + R4 R5 + R6 + R7 +
Flip-flop
Modulo-2
g(X )  1 X 4  X 6  X 7  X 8
adder
Message 010010
To channel

Figure 12: Encoder for the (15,7) cyclic code.

Register contents
Shifts Input
R0 R1 R2 R3 R4 R5 R6 R7
Initial state 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0
2 1 1 0 0 0 1 0 1 1
3 0 1 1 0 0 1 1 1 0
4 1 1 1 1 0 1 1 0 0
5 0 0 1 1 1 0 1 1 0
6 1 1 0 1 1 0 0 0 0
7 0 0 1 0 1 1 0 0 0

g(X) = 1 + X 4 + X 6 + X 7 + X 8

X n−k D(X) = X 8 (X + X 3 + X 5 ) = X 13 + X 11 + X 9

Divide X n−k D(X) by g(X) g(X) = 1 + X 4 + X 6 + X 7 + X 8

X 8 + X 7 + X 6 + X 4 + 1)X 13 + X 11 + X 9 (X 5 + X 4 + X 3 + X
- X 13 + X 12 + X 11 + X 9 + X 5
- ———————————–
- X 12 + X 5
- X 12 + X 11 + X 10 + X 8 + X 4
- ———————————–
- X 11 + X 10 + X 8 + X 5 + X 4
- X 11 + X 10 + X 9 + X 7 + X 3
- ———————————–
- X9 + X8 + X7 + X5 + X4 + X3
- X9 + X8 + X7 + X5 + X
- ———————————–
- X4 + X3 + X

Remainder Polynomial is R(X) = X + X 3 + X 4 Vector R=[01011000]


The code vector V is

[V ] = [R D]
= [01011000 0101010]

Dr. Manjunatha P Prof., Dept of ECE, JNN College of Engg Shimoga manjup.jnnce@gmail.com 17

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy