hen it detects this pattern in the shift register. For multiple error-correcting decoders, as discussed in the following section, the design of the error pattern detector is more complex. BCH Codes BCH codes are the most extensive and powerful family of error-correcting cyclic codes. Because of their mathematical structure, they allow decoders to be implemented reasonably easily, even for multiple-error correction. Both binary and nonbinary BCH codes exist; there Chapter 4 Coding are two classes of binary BCH code: primitive, which have a block length of n = 2m - 1, and nonprimitive, where n is a factor of 2m - 1. For any positive integers, m and t(t < 2m-1), there exists a primitive BCH code with the parameters n and r given by equations 4.15 and 4.16 and the minimum distance given by equation 4.17. n=2m-1 (4.15) r=n-k<mt (4.16) d2t+1 (4.17) Such a code can therefore be used as a t-error-correcting code. Both the algebraic basis of BCH codes and the decoder algorithms are described in many textbooks. Primitive BCH codes include cyclic forms of the Hamming SEC codes, and nonprimitive BCH codes include a cyclic form of the (23,12) Golay TEC code. The two main procedures used in decoding are 1. Peterson's direct solution, suitable for up to about 6-error correction. 2. The Berlekamp-Massey algorithm, an iterative algorithm applicable to any BCH code. Some decoder algorithms have also been developed for specific BCH codes-for example, the Kasami algorithm for the (23,12) TEC code. Reed-Solomon Codes Reed-Solomon (RS) codes are an important subclass of nonbinary BCH codes. RS codes have a true minimum distance between their codewords, which is the maximum possible for a linear (n,k) code, as in equation 4.18. They are therefore examples of maximum- distance-separable codes. d=n-k+1 (4.18) For decoding RS codes, both Peterson's method and the Berlekamp-Massey algorithm can be used. The latter is also known as the FSR synthesis algorithm because it is equival- ent to the generation of the coefficients of a certain LFSR