UNB ECE4253 Digital Communications
Department of Electrical and Computer Engineering - University of New Brunswick, Fredericton, NB, Canada

Introduction to Reed Solomon (RS) Codes

This page introduces the Reed Solomon (RS) Codes and the extended Galois fields upon which these powerful and popular codes are based.

Error control codewords with predictable properties can be generated using a primitive polynomial P(x) to build a suitable generator polynomial G(x). Galois fields form the basis for BCH codes capable of multi-bit error correction. Reed-Solomon (RS) codes are a subset of BCH codes, based on extended Galois fields GF(2m). The symbol-based RS codes boast inherent burst-error correction capability.


The Galois Field GF(23) = GF(8) based on P(x) = x3 + x + 1

The 8 terms {0, a0, a1, a2 ... a6} describe the 3-bit elements of this GF(8) as shown here in decimal for a = x = (2)

Each term an is given by xn mod P(x).

While P(x) is primitive in GF(2), this a is one of 3 polynomial roots of P(x) in GF(23); observe from the table that P(a) = a3 + a + 1 = 3 + 2 + 1 = 0


A Polynomial in GF(8)

A GF(23) polynomial can be defined using the above 3-bit values in {an} as coefficients.

For example, this polynomial M(x) has 3-bit coefficients in the range 0 to 7:

M(x) = a6 x3 + a0 x2 + a1 x + a4
  = 5 x3 + 1 x2 + 2 x + 6 , also written as (5 1 2 6)
  = (101) x3 + (001) x2 + (010) x + (110)
  = the 12-bit binary value 101001010110

Further arithmetic proceeds with reference to the above table defining this GF(8). Multiplication is most easily performed using the terms in an.


Generator Polynomial G(x) Formulation

The general form of the RS code generator polynomial G(x) is:

G(x) = (x - a1) (x - a2) (x - a3) (x - a4) ... (x - a2t)

Where t is the number of multi-bit symbols that can be corrected with the resulting code and 2t is the number of parity symbols. The abilty to correct symbol errors rather than individual bit errors is key to the power of the RS codes. This is somewhat like fixing bad digits in a credit card number rather than individual bit errors. For GF(8), the resulting code is (n,k) = (7, 7-2t), where the n and k and t all refer to a number of 3-bit symbols. The overall codeword size is 3 × 7 = 21 bits. In the present examples using GF(8) in which addition and subtraction are equivalent operations, the minus signs may be replaced with plus signs.


Generator Polynomial G(x) for RS Code based on GF(8)

The maximum codeword length with 3-bit symbols is 23-1 = 7 symbols as shown here.

Let t=1, then this G(x) defines a (n,k) = (7,5) RS code able to correct one bad 3-bit symbol.

G(x) = (x + a1) (x + a2)

G(x) = (x + 2) (x + 4)

G(x) = 1 x2 + 6 x + 3

Division by this degree 2 polynomial leaves a two symbol remainder.


Let t=2, then this G(x) defines a (n,k) = (7,3) RS code able to correct two bad 3-bit symbols.

G(x) = (x + a1) (x + a2) (x + a3) (x + a4)

G(x) = (x + 2) (x + 4) (x + 3) (x + 6)

G(x) = (1 x2 + 6 x + 3 ) (1 x2 + 5 x + 1 )

G(x) = 1 x4 + 3 x3 + 1 x2 + 2 x + 3

Division by this degree 4 polynomial leaves a four symbol remainder.


Example systematic (7,5) codeword with t=1 using G(x) = 1 x2 + 6 x + 3

Consider an input message F(x) having five symbols. It is necessary to append two parity symbols to make the complete RS codeword having seven symbols.

F(x) = 2 x4 + 1 x3 + 1 x2 + 5 x + 1

Multiply F(x) by x2 to append two zeros, then divide by G(x) .

F(x) x2 = 2 x6 + 1 x5 + 1 x4 + 5 x3 + 1 x2 + 0 x + 0

(F(x) x2) / G(x) = (2 6 5 7 1), remainder (4 3) (Check the math)

The remainder (4 3) is substituted for the two zeros to give the Reed Solomon codeword:

C(x) = 2 x6 + 1 x5 + 1 x4 + 5 x3 + 1 x2 + 4 x + 3

This systematic codeword is an exact multiple of G(x); (Check the math)

The seven 3-bit symbols in the entire codeword comprise 21 bits. Any error in any one symbol can be corrected, as shown below.


Error Correction on (7,5) RS codeword with t=1 using G(x) = 1 x2 + 6 x + 3

Consider the single-symbol error E(x):

E(x) = 6 x6

And the valid codeword C(x) from above:


C(x) = 2 x6 + 1 x5 + 1 x4 + 5 x3 + 1 x2 + 4 x + 3

Adding the error to the codeword gives M(x) = C(x) + E(x):

M(x) = 4 x6 + 1 x5 + 1 x4 + 5 x3 + 1 x2 + 4 x + 3

The errored symbol is shown highlighted.

Correcting the Error...

Dividing the errored codeword M(x) by G(x) gives a non-zero remainder, signalling the presence of an error.

M(x) / G(x) = (4 1 1 5 1 4 3) / G(x), giving remainder (2 7) (Check the math)

Observe that dividing the error pattern E(x) by G(x) gives the same non-zero remainder.

E(x) / G(x) = (6 0 0 0 0 0 0) / G(x), giving remainder (2 7) (Check the math)

The remainder (2 7) corresponds to the specific error pattern E(x) = 6 x6 and matches it to the errored word M(x). This single-symbol error in M(x) is easily corrected since the original C(x) = M(x) + E(x). Any single bad symbol could be corrected in this way; because each symbol is 3-bits, the RS codes inherently provide substantial burst-error correction.


Error Lookup Table, given a remainder (x y)

The remainder corresponding to E(x) = 6 x6 is shown highlighted. No other remainder matches this value.

 

Select a primitive polynomial P(x)

2024-04-25 17:58:18 ADT
Last Updated: 2013-01-03
Richard Tervo [ tervo@unb.ca ] Back to the course homepage...