4.5.8 Cyclic Codes
Cyclic codes are a subclass of linear block codes that possess a particularly convenient algebraic structure, making them highly practical for implementation using simple shift-register circuits. Most widely used block codes—such as Hamming, CRC, Bose–Chaudhuri–Hocquenghem (BCH), Golay, and Reed–Solomon (R–S) codes—are cyclic in nature.
A binary code is said to be cyclic if:
- The sum of any two codewords is also a codeword (linearity property).
- Any cyclic shift of a codeword produces another codeword (cyclic property).
In cyclic codes we use describe encoding operations using a generator polynomial, rather than a generator matrix. The generator polynomial g(X) for a (n,k) cyclic code is:
The coefficients of the polynomial, gi, are 1 or 0 for binary codes: g0 and gn–k must be 1. A polynomial g(X) uniquely defines an (n,k) cyclic code if it is of degree n–k and is a factor of X n+1.
The original k-bit data word is also represented as a polynomial, where the binary data bits serve as coefficients:
Similarly, a cyclic-code codeword can be expressed as:
A codeword is valid codeword if, and only if, g(X) divides c(X) without remainder.
4.5.8.1 Non-Systematic Codewords
A non-systematic cyclic codeword is generated by multiplying the generator polynomial by the appropriate data polynomial:
For example, the generator polynomial g(X)=1+X+X 3 can be used to generate a (7,4) cyclic code. For data word d=0011, corresponding to a data polynomial of d(X)=X 2+X 3, the codeword polynomial is:
(recall that in modulo-2 arithmetic X 3+X 3=0). The non-systematic codeword polynomial is therefore:
so that the equivalent binary codeword is c=0010111. Note this is non-systematic because the original data word d=0011 is not visible within the codeword.
4.5.8.2 Systematic Codewords
Cyclic codes have the useful property that any cyclic shift of a valid codeword yields another valid codeword. Since each power of X in the codeword polynomial c(X) represents a one-bit shift in time, multiplying by X represents a one-bit shift to the right. In general, for m cyclic shifts, if c(X) is a valid code polynomial, then:
is also a valid code polynomial. Modulo-(X n+1) arithmetic ensures that the cyclic property is maintained, since every valid codeword is a factor of (X n+1)
A systematic codeword is formed in cyclic codes with the structure:
where there are (n–k) parity-check bits, and k original data bits. The polynomial r(X) is called the parity-check polynomial:
To form the codeword, we first right-shift the data polynomial by (n–k) positions by multiplying by X n–k , and then divide by the generator polynomial to obtain a quotient q(X) and the remainder r(X):
Adding (in a modulo-2 sense) r(X) to both sides gives:
Thus, a valid systematic codeword is formed by adding the remainder polynomial to the shifted data polynomial.
By way of example, let us generate a systematic codeword for our data word d=0011 using the generator polynomial g(X)=1+X+X 3 to generate a (7,4) cyclic code. First, we obtain the parity-check bits (r1,r2,r3):
That is, we need to divide X 3(X 3 + X 2) by (1+ X + X 3) (all operations modulo-2). The quotient polynomial is q(X)= X 3 + X 2 + X and remainder polynomial is r(X)=X, so the remainder word is r=010. The final codeword is therefore c=0100011.
Back to reading