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) = a3 x3 + a1 x2 + a1 x + a2
  = 3 x3 + 2 x2 + 2 x + 4 , also written as (3 2 2 4)
  = (011) x3 + (010) x2 + (010) x + (100)
  = the 12-bit binary value 011010010100

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) = 4 x4 + 4 x3 + 3 x2 + 1 x + 3

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

F(x) x2 = 4 x6 + 4 x5 + 3 x4 + 1 x3 + 3 x2 + 0 x + 0

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

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

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

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) = 3 x2

And the valid codeword C(x) from above:


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

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

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

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 4 3 1 0 6 1) / G(x), giving remainder (1 5) (Check the math)

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

E(x) / G(x) = (0 0 0 0 3 0 0) / G(x), giving remainder (1 5) (Check the math)

The remainder (1 5) corresponds to the specific error pattern E(x) = 3 x2 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) = 3 x2 is shown highlighted. No other remainder matches this value.

 

Select a primitive polynomial P(x)

2024-03-04 13:52:04 AST
Last Updated: 2013-01-03
Richard Tervo [ tervo@unb.ca ] Back to the course homepage...