How this calculation works
Construct the narrow-sense primitive binary BCH generator from cyclotomic cosets.
Designed distance is a bound rather than an enumerated distance; A primitive binary length is two to the extension degree minus oneA worked example
For degree three and distance three, exponents one, two and four form the selected cyclotomic coset. Their product polynomial is x cubed plus x plus one. The default length is seven and generator degree is three, leaving four message coordinates. This generator construction is separate from a decoder or a true-distance search.
Good to know
m2–6,n=2^m−1,odd designed distance3–15;designed bound distinguished from true distance.
Reference: Mathematical method reference (opens in a new tab) ↗
Designed distance is a bound rather than an enumerated distance
Choose extension degree from two through six and an odd designed distance within the stated length. This page uses primitive narrow-sense binary codes with starting exponent one.
For degree three and distance three, exponents one, two and four form the selected cyclotomic coset. Their product polynomial is x cubed plus x plus one.
Compare this with the Linear error correcting code distance and weight enumerator calculator. Analyzing an entered generator matrix does not construct a BCH code from designed distance.
A primitive binary length is two to the extension degree minus one
The default length is seven and generator degree is three, leaving four message coordinates. This generator construction is separate from a decoder or a true-distance search.
The code length is two to m minus one because the selected primitive field element has that multiplicative order. The current construction fixes a primitive polynomial for each supported extension degree to make the root convention reproducible.
Cyclotomic cosets close the root set under squaring
The narrow-sense defining roots begin at alpha to power one and continue through alpha to power delta minus one. The designed distance delta is an input to the construction, rather than an estimated property obtained from random test messages.
Binary polynomials are closed under Frobenius squaring of their roots. Selecting one exponent therefore selects its entire doubling coset modulo the code length; the implementation closes the root set before multiplying factors.
Minimal-polynomial roots combine into a binary generator
Repeated cosets are included only once. Without that deduplication, a naive product would introduce repeated roots, enlarge the generator degree and incorrectly lower the dimension of the intended BCH code.
The root factors are multiplied in the extension field. Their product must have only binary coefficients after coset closure; any remaining nonconstant extension coordinate would fail the base-field reconstruction check.
Generator degree determines message dimension
For a monic binary generator of degree r dividing x to n minus one, the cyclic code dimension is n minus r. The output uses that degree count and retains the generator coefficients so the relationship is independently checkable.
The default length seven code with designed distance three has generator x cubed plus x plus one. Its generator degree is three, producing a four-dimensional message space and sixteen binary codewords.
The seven-bit default gives the Hamming code generator
The BCH bound guarantees at least the designed distance under the stated construction. The actual minimum distance can be larger, and no exhaustive codeword search is performed simply because the displayed generator is exact.
An encoding convention must still choose whether polynomial coordinates run from constant term upward or highest coefficient downward. The generator output explicitly uses ascending powers to avoid confusing a reciprocal polynomial with the printed code.
Changing the primitive polynomial changes representation conventions
This page constructs a code rather than correcting a received word. Error-location polynomials, syndrome decoding, erasures and shortened or punctured codes require further algorithms and are not hidden inside the dimension result.
The chosen primitive polynomial affects the named root but equivalent binary constructions can have different coordinate presentations. Compare length, dimension and defining conventions before assuming that two different coefficient lists describe unrelated codes.
A few questions, answered
What does designed distance is a bound rather than an enumerated distance mean here?
Choose extension degree from two through six and an odd designed distance within the stated length. This page uses primitive narrow-sense binary codes with starting exponent one.
What does cyclotomic cosets close the root set under squaring mean here?
The default length is seven and generator degree is three, leaving four message coordinates. This generator construction is separate from a decoder or a true-distance search.
What does generator degree determines message dimension mean here?
For degree three and distance three, exponents one, two and four form the selected cyclotomic coset. Their product polynomial is x cubed plus x plus one.
What does changing the primitive polynomial changes representation conventions mean here?
Choose extension degree from two through six and an odd designed distance within the stated length. This page uses primitive narrow-sense binary codes with starting exponent one.