You are on page 1of 3

Cyclic Codes

Cyclic codes are one set of codes which are very effective in detecting error bursts. The use of a feedback
mechanism, by which any transmitted code word is very much dependent upon the previous history of the
message, makes it highly unlikely for an error burst to produce an acceptable or undetected, received , encoded
message. The hardware required to perform cyclic coding is minimal, but the code efficiency is somewhat poor,
as several check bits must be added to the message bits.

Cyclic redundancy codes add several bits (up to about 25) to the shifted message encoded bits. The total data, or
message, block is usually considered one lengthy polynomial, P(x). At the transmission end, this message block
is divided by a fixed binary polynomial, called the generator polynomial G(x), which results in a polynomial
plus a remainder, R(x). This remainder known as the Block Check Character (BCC) is added to the message
block to form the encoded transmitted block.

At the receiver end, the received data block is divided by the same generator polynomial, G(x). If there is a
remainder, an error has occurred. Either error correction is performed, or retransmission is requested. The serial
data bits of the various code words in CRC’s are usually presented as polynomials for the sake of convenience.
They are written in the form ‫ ݔ‬௡ + ‫ ݔ‬௡ିଵ + ⋯ + ‫ ݔ‬ଶ + ‫ ݔ‬ଵ + ‫ ݔ‬଴ where ‫ ݔ‬௡ represent the highest order bit present
and ‫ ݔ‬଴ represent the least significant bit. For example the binary word 10101 is represented by ‫ ݔ‬ସ + ‫ ݔ‬ଶ + 1.
The degree of the polynomial is one less than the number of bits in the code word.

The addition or subtraction used in calculating the polynomial is called Modulo 2 addition and is performed by
XOR gates (XOR operation). In this arithmetic:
0 ⊕ 0 = 0, 0 ⊕ 1= 1, 1 ⊕ 0 =1 and 1 ⊕ 1= 0
Subtraction is identical to addition. Adding two polynomials, for example results in

‫ݔ‬ସ + ‫ݔ‬ଶ + ‫ݔ‬


‫ ݔ‬+ ‫ݔ‬ଶ + ‫ݔ‬

‫ݔ‬ସ + ‫ݔ‬ଷ

Since multiplication is nothing but continued self-addition, when the two polynomials above are multiplied, the
result is

ሺ‫ ݔ‬ସ + ‫ ݔ‬ଶ + ‫ ݔ‬ሻሺ‫ ݔ‬ଷ + ‫ ݔ‬ଶ + ‫ݔ‬ሻ


‫ ݔ‬ସ ሺ‫ ݔ‬ଷ + ‫ ݔ‬ଶ + ‫ ݔ‬ሻ + ‫ ݔ‬ଶ ሺ‫ ݔ‬ଷ + ‫ ݔ‬ଶ + ‫ ݔ‬ሻ + ‫ݔ‬ሺ‫ ݔ‬ଷ + ‫ ݔ‬ଶ + ‫ݔ‬ሻ
‫ ଻ݔ‬+ ‫ ଺ݔ‬+ ‫ݔ‬ହ + ‫ݔ‬ହ + ‫ݔ‬ସ + ‫ݔ‬ଷ + ‫ݔ‬ସ + ‫ݔ‬ଷ + ‫ݔ‬ଶ
‫ ଻ݔ‬+ ‫ ଺ݔ‬+ ‫ݔ‬ଶ

Dividing ‫ ݔ‬ହ + ‫ ݔ‬ଷ + ‫ ݔ‬by ‫ ݔ‬ଶ + ‫ ݔ‬+ 1 results in

‫ݔ‬ଷ + ‫ݔ‬ଶ + ‫ݔ‬


‫ ݔ‬+ ‫ ݔ‬+ 1| ‫ ݔ‬ହ

+ ‫ݔ‬ଷ +‫ݔ‬
ହ ସ ଷ
‫ ݔ‬+‫ ݔ‬+‫ݔ‬
‫ݔ‬ସ
‫ݔ‬ସ + ‫ݔ‬ଷ + ‫ݔ‬ଶ
‫ݔ‬ଷ + ‫ݔ‬ଶ + ‫ݔ‬
‫ݔ‬ଷ + ‫ݔ‬ଶ + ‫ݔ‬
0

If a remainder is present, it can always be expressed to a degree one less than the degree of the divisor.

1
The code words mentioned above can be defined as follows:
• M(x) Originating message polynomial consisting of m bits
• G(x) Generator polynomials
• T(x) Transmitted polynomial consisting of t bits
• E(x) Error polynomial

The encoded message, or transmitted polynomial, is obtained in several steps. First, the originating message,
M(x) is shifted c bits to the left, where c is the number of check bits to be added. The value of c is equivalent to
the degree of the generator polynomial. The shifted message can be analytically expressed as M(x) xC.

This shifted message is next divided by the generator polynomial, G(x). The remainder of this division
operation is added to the shifted message to generate the transmitted polynomial; T(x).This polynomial can
always be exactly divided by G(x). Thus,

‫ܯ‬ሺ‫ݔ‬ሻ‫ ݔ‬௖ ܴሺ‫ݔ‬ሻ


= ܳ ሺ‫ ݔ‬ሻ +
‫ܩ‬ሺ‫ݔ‬ሻ ‫ܩ‬ሺ‫ݔ‬ሻ

Where Q(x) is some quotient and R(x) is the remainder, which has a degree one less than the generator
polynomial. Multiplying through by G(x)

‫ܯ‬ሺ‫ ݔ‬ሻ‫ ݔ‬௖ = ܳሺ‫ ݔ‬ሻ‫ܩ‬ሺ‫ݔ‬ሻ + ܴሺ‫ݔ‬ሻ

Since subtraction is identical to addition, then

ܶሺ‫ ݔ‬ሻ = ‫ܯ‬ሺ‫ ݔ‬ሻ‫ ݔ‬௖ + ܴሺ‫ ݔ‬ሻ = ܳሺ‫ ݔ‬ሻ‫ܩ‬ሺ‫ݔ‬ሻ

Thus, it is proven that T(x) can always be divided by G(x). Let consider the following example:

1) Let message polynomial M(x) = 101101 (‫ ݔ‬ହ + ‫ ݔ‬ଷ + ‫ ݔ‬ଶ + 1), and generator polynomial G(x) =11001
(‫ ݔ‬ସ + ‫ ݔ‬ଷ + 1). G(x) contains 5 bits and is of degree 4. Therefore, the M(x) must be shifted by c = 4 bits.
The following shifted polynomial is obtained by multiplying M(x) by x4.

‫ܯ‬ሺ‫ ݔ‬ሻ. ‫ ݔ‬ସ = ሺ‫ ݔ‬ହ + ‫ ݔ‬ଷ + ‫ ݔ‬ଶ + 1ሻሺ‫ ݔ‬ସ ሻ = ‫ ݔ‬ଽ + ‫ ଻ ݔ‬+ ‫ ଺ ݔ‬+ ‫ ݔ‬ସ

2) Dividing this product by the generator polynomial G(x) gives:

‫ݔ‬ହ + ‫ݔ‬ସ + ‫ݔ‬ଶ


‫ ݔ‬+ ‫ ݔ‬+ 1| ‫ ݔ‬ଽ
ସ ଷ
+ ‫ ଻ݔ‬+ ‫଺ݔ‬ + ‫ݔ‬ସ
‫ݔ‬ଽ + ‫଼ݔ‬ + ‫ݔ‬ହ
‫ ଼ݔ‬+ ‫ ଻ݔ‬+ ‫ ଺ݔ‬+ ‫ݔ‬ହ + ‫ݔ‬ସ
‫ ଼ݔ‬+ ‫଻ݔ‬ + ‫ݔ‬ସ
‫ ଺ݔ‬+ ‫ݔ‬ହ
‫ ଺ݔ‬+ ‫ݔ‬ହ + ‫ݔ‬ଶ
+‫ ݔ‬ଶ ܴ݁݉ܽ݅݊݀݁‫ݎ‬

The remainder, R(x) = x2, is added to M(x).x4 to give the transmitted polynomial

‫ݔ‬ଽ + ‫ ଻ݔ‬+ ‫ ଺ݔ‬+ ‫ݔ‬ସ + ‫ݔ‬ଶ

2
Thus the transmitted codeword is 1011010100

3) If there is no error at the receiver, this message will produce no error when divided by the same generator
polynomial as shown below:

‫ݔ‬ହ + ‫ݔ‬ସ + ‫ݔ‬ଶ


‫ ݔ‬ସ + ‫ ݔ‬ଷ + 1| ‫ ݔ‬ଽ + ‫ ଻ݔ‬+ ‫଺ݔ‬ + ‫ݔ‬ସ + ‫ݔ‬ଶ
ଽ ଼ ହ
‫ ݔ‬+‫ݔ‬ +‫ݔ‬
‫ ݔ‬+ ‫ ݔ‬+ ‫ ݔ‬+ ‫ݔ‬ହ + ‫ݔ‬ସ
଼ ଻ ଺

‫ ଼ݔ‬+ ‫଻ݔ‬ + ‫ݔ‬ସ


‫ ଺ݔ‬+ ‫ݔ‬ହ + ‫ݔ‬ଶ
଺ ହ
‫ ݔ‬+‫ݔ‬ + ‫ݔ‬ଶ
0 ܰ‫ݎ݁݀݊݅ܽ݉݁ݎ ݋‬

You might also like