III Cyclic Codes Generator Matrix of Cyclic Codes

  • Slides: 12
Download presentation
III. Cyclic Codes

III. Cyclic Codes

Generator Matrix of Cyclic Codes Any Codeword is a Linear Combination of: g(X), Xg(X),

Generator Matrix of Cyclic Codes Any Codeword is a Linear Combination of: g(X), Xg(X), …, Xk-1 g(X) Example: (7, 4) Cyclic Code with g(X)=1+X+X 3 Could be converted to systematic form with the help of row operations © Tallal Elshabrawy 2

Parity Check Matrix of Cyclic Codes (Xn+1) is divisible by g(X), i. e. ,

Parity Check Matrix of Cyclic Codes (Xn+1) is divisible by g(X), i. e. , let (Xn+1)=g(X)h(X) where h(X)=h 0+h 1 X+h 2 X 2+…+hk. Xk Therefore v(X)h(x) = a(X)g(X)h(X) = a(X)(Xn+1) The degree of a(X)≤k-1, therefore, The powers Xk, Xk+1, …, Xn-1 do not appear in a(X)(Xn+1) v(X)h(X)=(v 0+v 1 X+…vn-1 Xn-1) (h 0+h 1 X+…hk. Xk), therefore vkh 0 +vk-1 h 1+ … + v 0 hk =0 vk+1 h 0+vkh 1 + … + v 1 hk =0. vn-1 h 0+vn-2 h 1+ … + vn-k-1 hk=0 © Tallal Elshabrawy 3

Parity Check Matrix of Cyclic Codes Example: (7, 4) Cyclic Code with g(X)=1+X+X 3

Parity Check Matrix of Cyclic Codes Example: (7, 4) Cyclic Code with g(X)=1+X+X 3 h(X)=(X 7+1 )/g(X) h(X)=1+X+X 2+X 4 © Tallal Elshabrawy 4

Cyclic Codes in Systematic form Consider an (n, k) cyclic code g(X) is the

Cyclic Codes in Systematic form Consider an (n, k) cyclic code g(X) is the generator polynomial u(X) is a message polynomial of degree<k Xn-ku(X)=u 0 Xn-k+u 1 Xn-k+1+… +uk-1 Xn-1 Divide Xn-ku(X) by g(X), Therefore Xn-ku(X)=a(X)g(X)+b(X) The degree of b(X) must be n-k-1 or less, i. e. , b(X)=b 0+b 1 X+…+bn-k-1 Xn-k-1 Rearranging: b(X)+Xn-ku(X)=a(X)g(X) b(X)+Xn-ku(X) is a multiple of g(X) and therefore is a code polynomial in the cyclic code b(X)+Xn-ku(X) corresponds to the codeword: (b 0, b 1, …, bn-k-1, u 0, u 1, …, uk-1) The code is systematic © Tallal Elshabrawy 5

Example Consider a (7, 4) cyclic code with g(X)=1+X+X 3 Given u=(1 0 0

Example Consider a (7, 4) cyclic code with g(X)=1+X+X 3 Given u=(1 0 0 1). Find the corresponding codeword if l The code is nonsystematic v(X)=u(X)g(X)=(1+X 3)(1+X+X 3)=1+X+X 4+X 6 v=(1 1 0 0 1) l The code is systematic X 3 u(X)=X 3+X 6. Dividing by g(X). The remainder b(X)=X 2+X v(X)=b(X)+X 3 u(X)=X+X 2+X 3+X 6 V=(0 1 1 1 0 0 1) © Tallal Elshabrawy 6

Encoding of Cyclic Codes in Systematic Form Three Steps: 1. Multiply the message polynomial

Encoding of Cyclic Codes in Systematic Form Three Steps: 1. Multiply the message polynomial u(X) by Xn-k 2. Dividing Xn-ku(X) by g(X) to obtain the remainder b(X) 3. Forming the codeword b(X)+Xn-ku(X) Encoding Circuit is a Division Circuit Gate g 2 g 1 b 0 + b 1 + gn-k-1 b 2 . . + bn-k-1 Xn-ku(X) + Codeword Information Bits Parity Check Bits © Tallal Elshabrawy 7

Encoding Circuit Example: Implementation Encoding Circuit of (7, 4) Cyclic Code with g(X)=1+X+X 3

Encoding Circuit Example: Implementation Encoding Circuit of (7, 4) Cyclic Code with g(X)=1+X+X 3 Gate b 0 + Assume u=(1 0 1 1) Input Register Contents b 1 b 2 Xn-ku(X) + Codeword Information Bits Parity Check Bits 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) © Tallal Elshabrawy Codeword: (1 0 0 1 1) 8

Encoding Circuit Example: Verification u=(1 0 1 1) u(X) = 1+X 2+X 3 1.

Encoding Circuit Example: Verification u=(1 0 1 1) u(X) = 1+X 2+X 3 1. X 3 u(X) = X 3+X 5+X 6 2. X 3 u(X)/g(X) = (1+X+X 2+X 3) +1/g(X) b(X) = 1 3. v(X) = 1+X 3+X 5+X 6 v = (1 0 0 1 1) © Tallal Elshabrawy 9

Syndrome Polynomial and Error Detection Let Received Polynomial represent the received vector r(X)=a(X)g(X)+s(X) is

Syndrome Polynomial and Error Detection Let Received Polynomial represent the received vector r(X)=a(X)g(X)+s(X) is called the syndrome polynomial Error Detection All codewords MUST BE divisible by g(X). i. e. , s(X) is identical to zero if and only if r(X) is a code polynomial If s(X)≠ 0 An Error Pattern is Detected © Tallal Elshabrawy 10

Syndrome Circuit is a Division Circuit Gate g 2 g 1 gn-k-1 r(X) +

Syndrome Circuit is a Division Circuit Gate g 2 g 1 gn-k-1 r(X) + Received Vector © Tallal Elshabrawy s 0 + s 1 + s 2 . . + sn-k-1 11

Encoding Circuit Example: Implementation Syndrome Circuit of (7, 4) Cyclic Code with g(X)=1+X+X 3

Encoding Circuit Example: Implementation Syndrome Circuit of (7, 4) Cyclic Code with g(X)=1+X+X 3 Gate + s 0 + s 1 s 2 Assume r=(0 0 1 1 0) Input Register Contents 0 0 0 (Initial State) 0 000 1 110 0 011 1 011 0 101 © Tallal Elshabrawy Syndrome: (1 0 1) 12