The Reed-Solomon codes, constructed in 1960, are an example of BCH codes. Because they work well for certain types of errors, they have been used in spacecraft communications and in compact discs.
Let be a finite field with elements and let . A basic fact from the theory of finite fields is that contains a primitive th root of unity . Choose with and let
This is a polynomial with coefficients in . It generates a BCH code over of length , called a Reed-Solomon code.
Since , the BCH bound implies that the minimum distance for is at least . Since is a polynomial of degree , it has at most nonzero coefficients. Therefore, the codeword corresponding to the coefficients of is a codeword of weight at most . It follows that the minimum weight for is exactly . The dimension of is . Therefore, a Reed-Solomon code is a cyclic code.
The codewords in correspond to the polynomials
There are such polynomials since there are choices for each of the coefficients of , and thus there are codewords in . Therefore, a Reed-Solomon code is a MDS code, namely, one that makes the Singleton bound (Section 24.3) an equality.
Let , the integers mod 7. Then and . A primitive sixth root of unity in is the same as a primitive root mod 7 (see Section 3.7). We may take . Choose . Then
The code has generating matrix
There are codewords in the code, obtained by taking all linear combinations mod 7 of the three rows of . The minimum weight of the code is 4.
Let , which was introduced in Section 3.11. Then has 4 elements, , and . Choose , so
is a generating matrix for the code. The code contains all 16 linear combinations of the two rows of , for example,
The minimum weight of the code is 2.
In many applications, errors are not randomly distributed. Instead, they occur in bursts. For example, in a CD, a scratch introduces errors in many adjacent bits. A burst of solar energy could have a similar effect on communications from a spacecraft. Reed-Solomon codes are useful in such situations.
For example, suppose we take . The elements of are represented as bytes of eight bits each, as in Section 3.11. We have . Let . The codewords are then vectors consisting of 255 bytes. There are 222 information bytes and 33 check bytes. These codewords are sent as strings of binary bits. Disturbances in the transmission will corrupt some of these bits. However, in the case of bursts, these bits will often be in a small region of the transmitted string. If, for example, the corrupted bits all lie within a string of 121 () consecutive bits, there can be errors in at most 16 bytes. Therefore, these errors can be corrected (because ). On the other hand, if there were 121 bit errors randomly distributed through the string of 2040 bits, numerous bytes would be corrupted, and correct decoding would not be possible. Therefore, the choice of code depends on the type of errors that are expected.