15
Information Theory Cyclic Codes 1

Cyclic Codes

Embed Size (px)

DESCRIPTION

Information theory , cyclic code.

Citation preview

Introduction

Information TheoryCyclic Codes

1

OutlineCyclic CodesDescription of Cyclic CodesGenerator PolynomialGenerator & Parity-check MatricesSyndrome Computation & Error DetectionCyclic Redundancy Check (CRC) codes2

1.Cyclic CodesAn (n,k) linear code C is cyclic if every cyclic shift of a codeword in C is also a codeword in C.If v0 v1 v2 . vn-2 vn-1 is a codeword, then vn-1 v0 v1 . vn-3 vn-2 vn-2 vn-1 v0 . vn-4 vn-3 : : : : : v1 v2 v3 . vn-1 v0 are all codewords.Cyclic codes form an important subclass of linear codes.Encoding and syndrome computation can be implemented easily by employing shift registers with feedback connections or linear sequential circuits.They have considerable inherent algebraic structure, it is possible to find various practical methods for decoding them.

2.Description of Cyclic Codes

4If the components of v = (v0, v1, ..., vn-1) are cyclically shifted one place to right then we obtain : v(1) = (vn-1, v0, v1, , vn-2)If the components of v are cyclically shifted i places to right v(i) = (vn-i, vn-i+1, , vn-1, v0, v1, , vn-i-1)

Polynomial representation of a codeword (code polynomial). v(x) = v0 + v1x + + vn-1xn-1

3.Generator PolynomialThe nonzero code polynomial of minimum degree in a cyclic code C is called the generator polynomial of C.Consider an (n,k) cyclic code with generator polynomial g(X) = g0 + g1X + + gn-kXn-k where g(x) is unique and In GF(2), g0 = 1 v(x)=u(x)g(x) is also a code polynomial , where u(x) is the information polynomial.

5

61+x+x2+x3+x4+x5+x6 = (1+x2+x5)g(x)1 1 1 1 1 1 1( 1 1 1 1 )x2+ x4+x5+x6 = (x2+x3)g(x)0 0 1 0 1 1 1( 0 1 1 1 )1+x3+x5+x6 = (1+x+x2+x3)g(x)1 0 0 1 0 1 1( 1 0 1 1 )x+x5+x6 = (x+x2+x3)g(x)0 1 0 0 0 1 1( 0 0 1 1 )x3+x4+x6 = x3g(x)0 0 0 1 1 0 1( 1 1 0 1 )1+x+x4+x6 = (1+x3)g(x)1 1 0 0 1 0 1( 0 1 0 1 )x+x2+x3+x6 = (x+x3 )g(x)0 1 1 1 0 0 1( 1 0 0 1 )1+x2+x6 = (1+x+x3)g(x)1 0 1 0 0 0 1( 0 0 0 1 )x+x3+x4+x5 = (x+x2)g(x)0 1 0 1 1 1 0( 1 1 1 0 )1+x4+x5 = (1+x+x2)g(x)

1 0 0 0 1 1 0( 0 1 1 0 )x2+ x3+x5 = x2g(x)0 0 1 1 0 1 0( 1 0 1 0 )1+x+x2+x5 = (1+x2)g(x)1 1 1 0 0 1 0( 0 0 1 0 )1+x2+x3+x4 = (1+x)g(x)1 0 1 1 1 0 0( 1 1 0 0 )x+x2+x4 = xg(x)0 1 1 0 1 0 0( 0 1 0 0 )1+x+x3 = 1g(x)1 1 0 1 0 0 0( 1 0 0 0 )0 = 0g(x)0 0 0 0 0 0 0( 0 0 0 0 )Code polynomialsCode VectorsMessagesA (7, 4) CYCLIC CODE GENERATED BY g(x) = 1+x+x3

7v = u Gv(x) = (u0 + u1x + + uk-1xk-1)g(x)xn+1 = g(x)h(x) , g(x) is a factor of xn+1where h(x) = h0 + h1x + + hkxk : parity polynomial

xkh(x-1) = hk + hk-1x + + h0xk So xkh(x-1) is also factor of xn+1 . And generates an (n, n-k) cyclic code with the following (n-k)*n matrix as a generator matrix.

G =k x n4.Generator & Parity-check Matrices

8

H = (n-k) x nNote If v(x) = a(x)g(x)v(x)h(x) = a(x)g(x)h(x) = a(x)(xn+1) = a(x) + xna(x)

H is a parity check matrix of the cyclic code C, parity check matrix H is obtained from the polynomial h(x) and h(x) is the parity polynomial of C. Hence a cyclic code is also uniquely specified by its parity polynomial.

4.Generator & Parity-check Matrices Contd.

5.Syndrome Computation & Error Detection

Suppose that a code vector is transmitted, r=(r0 , r1 , rn-1) be the received vector, the received vector may not be same as the transmitted code vector due to noise. In the decoding of a linear code, 1st step is to compute the syndrome s= r.HT , If the syndrome is zero, r is a code vector and the decoder accept r as the transmitted code vector otherwise 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 + r1x + + rn-1xn-1 Dividing r(x) by the generator polynomial g(x) r(x) = a(x)g(x) + s(x)

9

5.Syndrome Computation & Error Detection Contd.

10s(x) = 0r(x) is a code polynomial

syndrome

g1

s0s1 Gate

g2gn-k-1

sn-k-1

r(X)Receivedvectorr(x)/g(x) Fig : An (n-k)-stage syndrome circuit with input from the left end

6.Cyclic Redundancy Check (CRC) codesA systematic error detecting code A group of error control bits (which is the remainder of a polynomial division of a message polynomial by a generator polynomial) is appended to the end of the message block. With considerable burst-error detection capability.

11

Fig : CRC Generator and checker

6.Cyclic Redundancy Check (CRC) codes Contd.Let M(x) be the message polynomialLet g(x) be the generator polynomialg(x) is fixed for a given CRC schemeg(x) is known both by sender and receiverCreate a block polynomial C(x) based on M(x) and g(x) such that C(x) is divisible by g(x).SendingMultiply M(x) by xn Divide xnM(x) by g(x)Ignore the quotient and keep the reminder R(x)Form and send C(x) = xnM(x)+R(x)

12

6.Cyclic Redundancy Check (CRC) codes Contd.Can be easily implemented with small amount of hardwareShift registersXOR (for addition and subtraction)

ReceivingReceive C(x)Divide C(x) by g(x)Accept if remainder is 0, reject otherwise

13

14ExampleSendM(x) = 110011 x5+x4+x+1 (6 bits) g(x) = 11001 x4+x3+1 (5 bits, n = 4) 4 bits of redundancyForm xnM(x) 110011 0000 x9+x8+x5+x4Divide xnM(x) by g(x) to find R(x)

= R(x)Send the block 110011 1001Receive

No remainder Accept

Thank You...15