Let be a prime power and a positive integer coprime to . Let be the multiplicative order of modulo , so that contains a primitive -th root of unity . Fix integers and .
The BCH code over of length and designed distance is the cyclic code
Its generator polynomial is the least common multiple of the minimal polynomials over of . The code is narrow-sense if and primitive if .
By the BCH bound the minimum distance is at least ; it can be larger. Each minimal polynomial has degree at most , so the dimension is at least . For binary narrow-sense codes is a root whenever is, which improves this to for designed distance .
Examples: the binary primitive narrow-sense BCH code with is the Hamming code of length ; with and one obtains a code. For , , the minimal polynomials are linear and the BCH codes are the cyclic Reed–Solomon codes.
The binary codes were found by Bose and Ray-Chaudhuri and, independently, by Hocquenghem; see Huffman and Pless for the general theory and for algebraic decoding.