B. Cyclic Codes. Primitive polynomials are the generator polynomials of cyclic codes.

Similar documents
Chapter 5. Cyclic Codes

x n k m(x) ) Codewords can be characterized by (and errors detected by): c(x) mod g(x) = 0 c(x)h(x) = 0 mod (x n 1)

Cyclic codes: overview

Cyclic Codes. Saravanan Vijayakumaran August 26, Department of Electrical Engineering Indian Institute of Technology Bombay

Objective: To become acquainted with the basic concepts of cyclic codes and some aspects of encoder implementations for them.

Linear Cyclic Codes. Polynomial Word 1 + x + x x 4 + x 5 + x x + x f(x) = q(x)h(x) + r(x),

Fault Tolerance & Reliability CDA Chapter 2 Cyclic Polynomial Codes

Generator Matrix. Theorem 6: If the generator polynomial g(x) of C has degree n-k then C is an [n,k]-cyclic code. If g(x) = a 0. a 1 a n k 1.

Information Redundancy: Coding

Error Correction Review

Information redundancy

Linear Cyclic Codes. Polynomial Word 1 + x + x x 4 + x 5 + x x + x

7.1 Definitions and Generator Polynomials

Fault Tolerant Computing CS 530 Information redundancy: Coding theory. Yashwant K. Malaiya Colorado State University

A Brief Encounter with Linear Codes

ECEN 604: Channel Coding for Communications

Error Detection & Correction

Chapter 3 Linear Block Codes

Chapter 6. BCH Codes

EECS Components and Design Techniques for Digital Systems. Lec 26 CRCs, LFSRs (and a little power)

Cyclic codes. Vahid Meghdadi Reference: Error Correction Coding by Todd K. Moon. February 2008


MATH3302 Coding Theory Problem Set The following ISBN was received with a smudge. What is the missing digit? x9139 9

Math 512 Syllabus Spring 2017, LIU Post

Cyclic Redundancy Check Codes

ELEC3227/4247 Mid term Quiz2 Solution with explanation

Chapter 6 Reed-Solomon Codes. 6.1 Finite Field Algebra 6.2 Reed-Solomon Codes 6.3 Syndrome Based Decoding 6.4 Curve-Fitting Based Decoding

Physical Layer and Coding

Solutions to problems from Chapter 3

EE512: Error Control Coding

Binary Primitive BCH Codes. Decoding of the BCH Codes. Implementation of Galois Field Arithmetic. Implementation of Error Correction

MATH32031: Coding Theory Part 15: Summary

Outline. EECS Components and Design Techniques for Digital Systems. Lec 18 Error Coding. In the real world. Our beautiful digital world.

3. Coding theory 3.1. Basic concepts

ECEN 5682 Theory and Practice of Error Control Codes

Coding Theory and Applications. Solved Exercises and Problems of Cyclic Codes. Enes Pasalic University of Primorska Koper, 2013

MATH Examination for the Module MATH-3152 (May 2009) Coding Theory. Time allowed: 2 hours. S = q

Dr. Cathy Liu Dr. Michael Steinberger. A Brief Tour of FEC for Serial Link Systems

Information Theory. Lecture 7

The extended coset leader weight enumerator

Implementation of Galois Field Arithmetic. Nonbinary BCH Codes and Reed-Solomon Codes

Fully-parallel linear error block coding and decoding a Boolean approach

ELG 5372 Error Control Coding. Lecture 12: Ideals in Rings and Algebraic Description of Cyclic Codes

EE 229B ERROR CONTROL CODING Spring 2005

ERROR CORRECTING CODES

Optimum Soft Decision Decoding of Linear Block Codes

Solutions or answers to Final exam in Error Control Coding, October 24, G eqv = ( 1+D, 1+D + D 2)

Error Correction and Trellis Coding

Optical Storage Technology. Error Correction

EECS150 - Digital Design Lecture 26 Error Correction Codes, Linear Feedback Shift Registers (LFSRs)

The BCH Bound. Background. Parity Check Matrix for BCH Code. Minimum Distance of Cyclic Codes

EE 229B ERROR CONTROL CODING Spring 2005

Know the meaning of the basic concepts: ring, field, characteristic of a ring, the ring of polynomials R[x].

The Pennsylvania State University. The Graduate School. Department of Computer Science and Engineering

Reed-Muller Codes. These codes were discovered by Muller and the decoding by Reed in Code length: n = 2 m, Dimension: Minimum Distance

A 2-error Correcting Code

ECE8771 Information Theory & Coding for Digital Communications Villanova University ECE Department Prof. Kevin M. Buckley Lecture Set 2 Block Codes

Outline. MSRI-UP 2009 Coding Theory Seminar, Week 2. The definition. Link to polynomials

EE512: Error Control Coding

Design and Implementation of Reed-Solomon Decoder using Decomposed Inversion less Berlekamp-Massey Algorithm by

SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR Siddharth Nagar, Narayanavanam Road UNIT I

EECS150 - Digital Design Lecture 23 - FFs revisited, FIFOs, ECCs, LSFRs. Cross-coupled NOR gates

GF(2 m ) arithmetic: summary

MATH 433 Applied Algebra Lecture 22: Review for Exam 2.

Linear Feedback Shift Registers (LFSRs) 4-bit LFSR

MATH 433 Applied Algebra Lecture 21: Linear codes (continued). Classification of groups.

1. How many errors may be detected (not necessarily corrected) if a code has a Hamming Distance of 6?

Mathematics Department

: Coding Theory. Notes by Assoc. Prof. Dr. Patanee Udomkavanich October 30, upattane

Error Control Codes for Memories

MATH/MTHE 406 Homework Assignment 2 due date: October 17, 2016

Coding Theory: Linear-Error Correcting Codes Anna Dovzhik Math 420: Advanced Linear Algebra Spring 2014

} has dimension = k rank A > 0 over F. For any vector b!

1 Vandermonde matrices

An Enhanced (31,11,5) Binary BCH Encoder and Decoder for Data Transmission

ECE 4450:427/527 - Computer Networks Spring 2017

5.0 BCH and Reed-Solomon Codes 5.1 Introduction

ELEC 519A Selected Topics in Digital Communications: Information Theory. Hamming Codes and Bounds on Codes

Binary Linear Codes G = = [ I 3 B ] , G 4 = None of these matrices are in standard form. Note that the matrix 1 0 0

VHDL Implementation of Reed Solomon Improved Encoding Algorithm

Error Correction Methods

Vector spaces. EE 387, Notes 8, Handout #12

EECS150 - Digital Design Lecture 21 - Design Blocks

Topic 3. Design of Sequences with Low Correlation

1 Reed Solomon Decoder Final Project. Group 3 Abhinav Agarwal S Branavan Grant Elliott. 14 th May 2007

G Solution (10 points) Using elementary row operations, we transform the original generator matrix as follows.

Chapter 4 Finite Fields

Communications II Lecture 9: Error Correction Coding. Professor Kin K. Leung EEE and Computing Departments Imperial College London Copyright reserved

Error-correcting codes and Cryptography

6.1.1 What is channel coding and why do we use it?

Channel Coding I. Exercises SS 2017

EE512: Error Control Coding

: Error Correcting Codes. November 2017 Lecture 2

MATH 291T CODING THEORY

Error Detection, Correction and Erasure Codes for Implementation in a Cluster File-system

Getting Connected. Chapter 2, Part 2. Networking CS 3470, Section 1 Sarah Diesburg

ELEC 405/ELEC 511 Error Control Coding. Hamming Codes and Bounds on Codes

Lecture 12. Block Diagram

A field F is a set of numbers that includes the two numbers 0 and 1 and satisfies the properties:

Solutions of Exam Coding Theory (2MMC30), 23 June (1.a) Consider the 4 4 matrices as words in F 16

Transcription:

B. Cyclic Codes A cyclic code is a linear block code with the further property that a shift of a codeword results in another codeword. These are based on polynomials whose elements are coefficients from GF(2). These polynomials can be added, (subtracted), multiplied and (divided) in the usual way, remembering that 1+1=0=1-1; 1*1=1. There are 2 basic properties of polynomials over GF(2). 1. A polynomial of degree m is irreducible over GF(2), if it is not divisible by any other polynomial of degree less than m over GF(2). 2. Further, an irreducible polynomial of degree m, is said to be a primitive polynomial, if it is divisible by the polynomial X n + 1, where n = (2 m 1), and is not divisible by any polynomial of degree less than (2 m 1). Primitive polynomials are the generator polynomials of cyclic codes. The Galois field over GF(2), (with elements 0 and 1), can be extended to one of 2 m elements, GF(2 m ). These will be developed when dealing with BCH codes. The generator polynomial of a cyclic code has the following properties. (i) For an (n,k) code the degree of g(x) is (n-k) = m and n = (2 m 1). (ii) g(x) must have the element 1 as its first element. (iii) g(x) is a primitive polynomial of X n +1; (iv) every codeword has degree that is (n-1) or less (v) every codeword is a multiple of g(x), the multiple being all possible polynomials of degree m or less. Example: The polynomial X 7 + 1 has three factors given by (1+X)(1+X+X 3 )(1+X 2 + X 3 ) All three are irreducible. However (1+X) is not primitive. Both polynomials of degree 3 can be used as generator polynomials for a (7,4) cyclic code. Systematic code Given a g(x), the code can be put into systematic form, using the following steps: (i) Premultiply the message u(x) by X (n-k). (ii) Obtain the remainder r(x), that gives the parity-check bits, by dividing X (n-k).u(x) by the g(x) (iii) Combine r(x) and X (n-k).u(x) to obtain the code polynomial r(x) + X (n-k).u(x) The format of this systematic code is [P, U] where P are the parity bits and U are the data bits. 1

Using as g(x), (1+X 2 + X 3 ) the systematic code is obtained as follows. Note that the polynomial is in reverse order ie 1100 is 1+X and NOT X 3 + X 2. Message Codeword Polynomial 0000 000 0000 0.g(X) 1000 101 1000 1.g(X) 0100 111 0100 1+X+ X 2 + X 4 = (1+ X).g(X) 1100 010 1100 X + X 3 + X 4 = X.g(X) 0010 110 0010 1 + X + X 5 = (1 + X+ X 2 ). g(x) 1010 011 1010 X + X 2 + X 3 + X 5 = (X+ X 2 ).g(x) 0110 001 0110 X 2 + X 4 + X 5 = X 2.g(X) 1110 100 1110 1 + X 3 + X 4 + X 5 = (1 + X 2 ).g(x) 0001 011 0001 X + X 2 + X 6 = (X + X 2 + X 3 ).g(x) 1001 110 1001 1 + X + X 3 + X 6 = (1 + X + X 2 + X 3 ).g(x) 0101 100 0101 1 + X 4 + X 6 = (1 + X 2 + X 3 )g(x) 1101 001 1101 X 2 + X 3 + X 4 + X 6 = (X 2 + X 3 ).g(x) 0011 101 0011 1 + X 2 + X 5 + X 6 = (1 + X 3 ).g(x) 1011 000 1011 X 3 + X 5 + X 6 = (X 3 ).g(x) 0111 010 0111 X + X 4 + X 5 + X 6 = (X + X 3 ).g(x) 1111 111 1111 1+X+X 2 +X 3 +X 4 +X 5 +X 6 = (1 + X + X 3 ).g(x) Generator and Parity-Check Matrices A generator polynomial g(x) of order (n-k) can be made to span the code C of dimension n, by shifting the g(x), k positions (rows). For example for the g(x) above the Generator Matrix, G is given by 1 0 11 0 0 0 G = 0 1 0 11 0 0 G is not in systematic form, but can be using row operations.using 0 0 1 0 11 0 0 0 0 1 0 11 row1+row2 for row2; rows 1,2,and 3 for row3, and rows 2,3,and 4 for row 4 resulting in 1 0 11 0 0 0 G = 111 0 1 0 0 which is now in systematic form. 11 0 0 0 1 0 0 11 0 0 0 1 Since g(x) is a factor of (X n + 1), (X n + 1) = g(x). h(x) where h(x) has degree k of the form h(x) = h 0 + h 1 X+... + h k X k and h 0 = h k = 1. h(x) is the parity polynomial of the code, and X k h(x -1 ) is a polynomial that generates an (n,n-k) cyclic code. It is defined as X k h(x -1 ) = h k + h k-1 X+... + h 0 X k. It can be shown that every code vector in the code of g(x) is orthogonal to every row of the matrix H generated by X k h(x -1 ), and therefore H is the parity-check matrix for G. 2

Starting from (X 7 + 1) and g(x) = (1+X 2 + X 3 ) it follows that h(x) is given by h(x) = 1 + X 2 + X 3 + X 4 and X 4 h(x -1 ) = 1 + X + X 2 + X 4 Hence H is obtained as H = 111 0 1 0 0 0 111 0 1 0 0 0 111 0 1 H is an (n, n-k) matrix in this case a (7,3) matrix. Adding row 1,row 3 in row3 for a systematic form H, given by 111 0 1 0 0 H = 0 111 0 1 0. It can easily be shown that the syndrome of any code vector from 11 0 1 0 0 1 the code polynomials above results in v.h T = 0, and s =[0 0 0] Encoding of a cyclic code A shift register system based on g(x) is used to generate a code word, Figure 4.1 Figur 4.1 Note the connections of XOR s at position 2 and position3. The data bits are passed to the output and into the feedback register system, msb first. Then the switch is moved to the feedback register output and the parity bits are passed out. For an input 1011 the system shifts are Registers Initial 0 0 0 Shift 1 1 1 0 1 Shift 2 1 0 1 0 Shift 3 0 0 0 1 Shift 4 1 0 0 0 Final codeword is 0 0 0 1 0 1 1 3

Syndrome Computation Given a received word r(x), the syndrome is obtained as the remainder of r(x)/g(x). The remainder must be a polynomial of degree (n-k-1) or less. With cyclic codes the syndrome can be obtained through a feedback shift register circuit quite similar to the encoder. The syndrome circuit for the (7,4) code with g(x) = (1 + X 2 + X 3 ) is shown below. Note that the received word is input from the left, unlike the data bits input from the right in the circuit of Figure 4.1. Given the received n-tuple r(x) = [1 0 0 1 0 1 1] the register contents results in Shift Input Register Contents 0 0 0 1 1 1 0 0 2 1 1 1 0 3 0 0 1 1 4 1 0 0 0 5 0 0 0 0 6 0 0 0 0 7 1 1 0 0 8-0 1 0 The resulting syndrome is [1 0 0]. Note that a cyclic shift of the syndrome results in the syndrome for the cyclic shift of the received word given by X.r(X) Because of the cyclic shift property a cyclic code is capable of detecting any error burst of length (n-k) or less, including the end-around bursts. 4

Cyclic Codes Decoding Cyclic codes can be decoded in the same way as linear block codes, using the standard array and the coset leaders, as error vectors, in relation to the syndrome pattern obtained after decoding. This still requires a decoding table to associate the syndrome to its corresponding error pattern. Because of the cyclic nature, the error pattern and its corresponding syndrome are obtained directly either through dividing by g(x) or the syndrome circuit. The syndrome error pattern table for the (7,4) code with g(x) = (1 + X 2 + X 3 ) is shown below. Ei represents the error bit in the received r(x). For no errors s = [000]. E6 = [011] E5 = [110] E4 = [111] E3 = [101] E2 = [001] E1 = [010] E0 = [100] A decoding circuit can be designed to automatically detect, and correct a single-bit error based on the cyclic property. The pattern for E6 = [011] is used to compare to the syndrome of the particular bit error. The stored received word is shifted out bit by bit, as the syndrome pattern obtained is compared. Based on s = E6, since the syndrome s i represented by the i-th shift of the s, corresponds to the syndrome of the r i (X) the i-th shift of the received word r(x), the error bit can be corrected as the received word is passed out from the buffer. The circuit is shown in Figure 4.3 below. 5

This type of decoder is also known as a Meggitt Decoder. Another important property of a cyclic code is the capability of detecting burst errors. An (n.k) cyclic code can detect any error burst, of length (n-k) nor less, including end around bursts. For example the CRC check based on g(x) = 1 + X 2 + X 15 + X 16 with n = 2 16 1 = 32767; n-k = 16; and k = 32751 is capable of detecting all error bursts of 16 or less. Cyclic Hamming Codes A cyclic Hamming code of length 2 m 1, with m 3 is generated by a primitive polynomial p(x) of degree m. Note that since the degree of g(x) is (n-k) = (m 1), the number of information bits k is 2 m m 1 In general the codeword is obtained, using a generator polynomial p(x) from X m+i = a i (X).p(X) + b i (X) where the remainder b i (X), of degree (m-1) or less forms the parity checks, with at least two 1 s. Given H = {I m Q} where Q is an m x (2 m m 1) matrix, the b i (X) s form the columns of Q. For example using the primitive polynomial 1+X+X 3 a (7,4) cyclic Hamming code can be generated. This code can correct one bit in error. Modified Hamming Code A Hamming code H = [I m Q] can be modified to H = [I m Q ] where Q consists of 2 m m (instead of 2 m m 1) columns. This new code is capable of correcting single errors and detecting double errors. In terms of cyclic codes this is obtained by modifying g(x) to g (X) = (1+X) g(x). The minimum distance of the resulting code is 4. The decoding circuit of the single correcting code is modified as follows. Let r(x) be the received word. (i) Divide X m. r(x) by g(x) to obtain a remainder that is the syndrome s(x) of degree m-1 or less (ii) Divide r(x) by (X+1) to obtain a remainder, ñ, whose value is either 0 or 1. The detection circuit has the following scheme. Step 1 if ñ = 0, and s(x) = 0 then the r(x) is a codeword c(x) Step 2 if ñ = 1, and s(x) 0, one error has occurred and it can be corrected Step 3 if ñ = 0, and s(x) 0, two errors are detected, hence alarm signal of a detected but uncorrectable error pattern. Step 4 if ñ = 1, and s(x) = 0, there are at least 3 errors such that r(x) has been changed to a c(x). Indication of an undetectable error. Probability of undetectable error. The extended code C with minimum distance 4, consists of the even weighted code vectors of the original code C, with minimum distance 3. 6

The original weight distribution polynomial, for the Hamming Code, (n, k) is given by 1 n 2 ( n 1) / 2 A ( z) {(1 z) n(1 z)(1 z ) } (4.1) n 1 and the weight distribution of the new code C, A (z), is made up of the even power terms of A(z), given by A (z) = ½[A(z) + A(-z)], and using A(z) above to obtain 1 n n 2 ( n 1) / 2 A '( z) {(1 z) (1 z) 2n(1 z ) } (4.2) 2( n 1) Using P n i n i u ( E) Ai p (1 p) (4.3) i 1 and (4.2) P u (E) can be calculated in terms of A (z). This can also be calculated from the dual code. The dual of a distance 4 Hamming code has a weight distribution B (z) given by m 1 m 1 m m 2 1 m 2 2 1 B'( z) 1 (2 1) z (2 1) z z (4.4) Using (3.9) and (4.4) P u (E) can be calculated. In terms of B (z). P ( m 1) m 2 1 2 1 2 1 u ( E) 2 {1 2(2 1)(1 p)(1 2 p) (1 2 p) } (1 p) (4.5) It can be shown that P u (E) in (4.5) satisfies the upper bound 2 -(n-k) ( = 2 -(m+1) ) Shortened Cyclic Codes An (n,k) cyclic code can be altered to an (n-l, k-l) code, shortened by l bits. This code is strictly a shortened cyclic code. It consists of a subset of the original codewords of degree (n-i) or less, still using the same g(x) and generating the same syndrome during decoding. However, when decoding, the (n-l) shifts that are used to input the received word, still require a further l-shifts to align to the syndrome pattern, and eventually to an error position X n-l-i. To remove the extra shifts, either the connections to the syndrome register, or the syndrome pattern can be shifted to the appropriate start pattern, to align the syndrome pattern to the first potential error bit. Figure 4.4 shows the decoding circuit for a (31,26) cyclic code with the AND gate looking for the first error pattern 00001. When Figure 4.4 is adapted to a shortened cyclic code (28,23) with l =3, the new start syndrome, for the same circuit but having a 28-bit shift register, is given by 01000 m 1 m m 7

8