Hubbry Logo
BCH codeBCH codeMain
Open search
BCH code
Community hub
BCH code
logo
7 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
BCH code
BCH code
from Wikipedia

In coding theory, the Bose–Chaudhuri–Hocquenghem codes (BCH codes) form a class of cyclic error-correcting codes that are constructed using polynomials over a finite field (also called a Galois field). BCH codes were invented in 1959 by French mathematician Alexis Hocquenghem, and independently in 1960 by Raj Chandra Bose and D. K. Ray-Chaudhuri.[1][2][3] The name Bose–Chaudhuri–Hocquenghem (and the acronym BCH) arises from the initials of the inventors' surnames (mistakenly, in the case of Ray-Chaudhuri).

One of the key features of BCH codes is that during code design, there is a precise control over the number of symbol errors correctable by the code. In particular, it is possible to design binary BCH codes that can correct multiple bit errors. Another advantage of BCH codes is the ease with which they can be decoded, namely, via an algebraic method known as syndrome decoding. This simplifies the design of the decoder for these codes, using small low-power electronic hardware.

BCH codes are used in applications such as satellite communications,[4] compact disc players, DVDs, disk drives, USB flash drives, solid-state drives,[5] and two-dimensional bar codes.

Definition and illustration

[edit]

Primitive narrow-sense BCH codes

[edit]

Given a prime number q and prime power qm with positive integers m and d such that dqm − 1, a primitive narrow-sense BCH code over the finite field (or Galois field) GF(q) with code length n = qm − 1 and distance at least d is constructed by the following method.

Let α be a primitive element of GF(qm). For any positive integer i, let mi(x) be the minimal polynomial with coefficients in GF(q) of αi. The generator polynomial of the BCH code is defined as the least common multiple g(x) = lcm(m1(x),…,md − 1(x)). It can be seen that g(x) is a polynomial with coefficients in GF(q) and divides xn − 1. Therefore, the polynomial code defined by g(x) is a cyclic code.

Example

[edit]

Let q = 2 and m = 4 (therefore n = 15). We will consider different values of d for GF(16) = GF(24) based on the reducing polynomial z4 + z + 1, using primitive element α(z) = z. There are fourteen minimum polynomials mi(x) with coefficients in GF(2) satisfying

The minimal polynomials are

The BCH code with has the generator polynomial

It has minimal Hamming distance at least 3 and corrects up to one error. Since the generator polynomial is of degree 4, this code has 11 data bits and 4 checksum bits. It is also denoted as: (15, 11) BCH code.

The BCH code with has the generator polynomial

It has minimal Hamming distance at least 5 and corrects up to two errors. Since the generator polynomial is of degree 8, this code has 7 data bits and 8 checksum bits. It is also denoted as: (15, 7) BCH code.

The BCH code with has the generator polynomial

It has minimal Hamming distance at least 7 and corrects up to three errors. Since the generator polynomial is of degree 10, this code has 5 data bits and 10 checksum bits. It is also denoted as: (15, 5) BCH code. (This particular generator polynomial has a real-world application, in the "format information" of the QR code.)

The BCH code with and higher has the generator polynomial

This code has minimal Hamming distance 15 and corrects 7 errors. It has 1 data bit and 14 checksum bits. It is also denoted as: (15, 1) BCH code. In fact, this code has only two codewords: 000000000000000 and 111111111111111 (a trivial repetition code).

General BCH codes

[edit]

General BCH codes differ from primitive narrow-sense BCH codes in two respects.

First, the requirement that be a primitive element of can be relaxed. By relaxing this requirement, the code length changes from to the order of the element

Second, the consecutive roots of the generator polynomial may run from instead of

Definition. Fix a finite field where is a prime power. Choose positive integers such that and is the multiplicative order of modulo

As before, let be a primitive th root of unity in and let be the minimal polynomial over of for all The generator polynomial of the BCH code is defined as the least common multiple

Note: if as in the simplified definition, then is 1, and the order of modulo is Therefore, the simplified definition is indeed a special case of the general one.

Special cases

[edit]
  • A BCH code with is called a narrow-sense BCH code.
  • A BCH code with is called primitive.

The generator polynomial of a BCH code has coefficients from In general, a cyclic code over with as the generator polynomial is called a BCH code over The BCH code over and generator polynomial with successive powers of as roots is one type of Reed–Solomon code where the decoder (syndromes) alphabet is the same as the channel (data and generator polynomial) alphabet, all elements of .[6] The other type of Reed Solomon code is an original view Reed Solomon code which is not a BCH code.

Properties

[edit]

The generator polynomial of a BCH code has degree at most . Moreover, if and , the generator polynomial has degree at most .

A BCH code has minimal Hamming distance at least .

A BCH code is cyclic.

Encoding

[edit]

Because any polynomial that is a multiple of the generator polynomial is a valid BCH codeword, BCH encoding is merely the process of finding some polynomial that has the generator as a factor.

The BCH code itself is not prescriptive about the meaning of the coefficients of the polynomial; conceptually, a BCH decoding algorithm's sole concern is to find the valid codeword with the minimal Hamming distance to the received codeword. Therefore, the BCH code may be implemented either as a systematic code or not, depending on how the implementor chooses to embed the message in the encoded polynomial.

Non-systematic encoding: The message as a factor

[edit]

The most straightforward way to find a polynomial that is a multiple of the generator is to compute the product of some arbitrary polynomial and the generator. In this case, the arbitrary polynomial can be chosen using the symbols of the message as coefficients.

As an example, consider the generator polynomial , chosen for use in the (31, 21) binary BCH code used by POCSAG and others. To encode the 21-bit message {101101110111101111101}, we first represent it as a polynomial over :

Then, compute (also over ):

Thus, the transmitted codeword is {1100111010010111101011101110101}.

The receiver can use these bits as coefficients in and, after error-correction to ensure a valid codeword, can recompute

Systematic encoding: The message as a prefix

[edit]

A systematic code is one in which the message appears verbatim somewhere within the codeword. Therefore, systematic BCH encoding involves first embedding the message polynomial within the codeword polynomial, and then adjusting the coefficients of the remaining (non-message) terms to ensure that is divisible by .

This encoding method leverages the fact that subtracting the remainder from a dividend results in a multiple of the divisor. Hence, if we take our message polynomial as before and multiply it by (to "shift" the message out of the way of the remainder), we can then use Euclidean division of polynomials to yield:

Here, we see that is a valid codeword. As is always of degree less than (which is the degree of ), we can safely subtract it from without altering any of the message coefficients, hence we have our as

Over (i.e. with binary BCH codes), this process is indistinguishable from appending a cyclic redundancy check, and if a systematic binary BCH code is used only for error-detection purposes, we see that BCH codes are just a generalization of the mathematics of cyclic redundancy checks.

The advantage to the systematic coding is that the receiver can recover the original message by discarding everything after the first coefficients, after performing error correction.

Decoding

[edit]

There are many algorithms for decoding BCH codes. The most common ones follow this general outline:

  1. Calculate the syndromes sj for the received vector
  2. Determine the number of errors t and the error locator polynomial Λ(x) from the syndromes
  3. Calculate the roots of the error location polynomial to find the error locations Xi
  4. Calculate the error values Yi at those error locations
  5. Correct the errors

During some of these steps, the decoding algorithm may determine that the received vector has too many errors and cannot be corrected. For example, if an appropriate value of t is not found, then the correction would fail. In a truncated (not primitive) code, an error location may be out of range. If the received vector has more errors than the code can correct, the decoder may unknowingly produce an apparently valid message that is not the one that was sent.

Calculate the syndromes

[edit]

The received vector is the sum of the correct codeword and an unknown error vector The syndrome values are formed by considering as a polynomial and evaluating it at Thus the syndromes are[7]

for to

Since are the zeros of of which is a multiple, Examining the syndrome values thus isolates the error vector so one can begin to solve for it.

If there is no error, for all If the syndromes are all zero, then the decoding is done.

Calculate the error location polynomial

[edit]

If there are nonzero syndromes, then there are errors. The decoder needs to figure out how many errors and the location of those errors.

If there is a single error, write this as where is the location of the error and is its magnitude. Then the first two syndromes are

so together they allow us to calculate and provide some information about (completely determining it in the case of Reed–Solomon codes).

If there are two or more errors,

It is not immediately obvious how to begin solving the resulting syndromes for the unknowns and

The first step is finding, compatible with computed syndromes and with minimal possible locator polynomial:

Three popular algorithms for this task are:

  1. Peterson–Gorenstein–Zierler algorithm
  2. Berlekamp–Massey algorithm
  3. Sugiyama Euclidean algorithm

Peterson–Gorenstein–Zierler algorithm

[edit]

Peterson's algorithm is the step 2 of the generalized BCH decoding procedure. Peterson's algorithm is used to calculate the error locator polynomial coefficients of a polynomial

Now the procedure of the Peterson–Gorenstein–Zierler algorithm.[8] Expect we have at least 2t syndromes sc, …, sc+2t−1. Let v = t.

  1. Start by generating the matrix with elements that are syndrome values
  2. Generate a vector with elements
  3. Let denote the unknown polynomial coefficients, which are given by
  4. Form the matrix equation
  5. If the determinant of matrix is nonzero, then we can actually find an inverse of this matrix and solve for the values of unknown values.
  6. If then follow
           if 
           then
                 declare an empty error locator polynomial
                 stop Peterson procedure.
           end
           set 
    
    continue from the beginning of Peterson's decoding by making smaller
  7. After you have values of , you have the error locator polynomial.
  8. Stop Peterson procedure.

Factor error locator polynomial

[edit]

Now that you have the polynomial, its roots can be found in the form by brute force for example using the Chien search algorithm. The exponential powers of the primitive element will yield the positions where errors occur in the received word; hence the name 'error locator' polynomial.

The zeros of Λ(x) are αi1, …, αiv.

Calculate error values

[edit]

Once the error locations are known, the next step is to determine the error values at those locations. The error values are then used to correct the received values at those locations to recover the original codeword.

For the case of binary BCH, (with all characters readable) this is trivial; just flip the bits for the received word at these positions, and we have the corrected code word. In the more general case, the error weights can be determined by solving the linear system

Forney algorithm

[edit]

However, there is a more efficient method known as the Forney algorithm.

Let

And the error evaluator polynomial[9]

Finally:

where

Than if syndromes could be explained by an error word, which could be nonzero only on positions , then error values are

For narrow-sense BCH codes, c = 1, so the expression simplifies to:

Explanation of Forney algorithm computation

[edit]

It is based on Lagrange interpolation and techniques of generating functions.

Consider and for the sake of simplicity suppose for and for Then

We want to compute unknowns and we could simplify the context by removing the terms. This leads to the error evaluator polynomial

Thanks to we have

Thanks to (the Lagrange interpolation trick) the sum degenerates to only one summand for

To get we just should get rid of the product. We could compute the product directly from already computed roots of but we could use simpler form.

As formal derivative

we get again only one summand in

So finally

This formula is advantageous when one computes the formal derivative of form

yielding:

where

Decoding based on extended Euclidean algorithm

[edit]

An alternate process of finding both the polynomial Λ and the error locator polynomial is based on Yasuo Sugiyama's adaptation of the Extended Euclidean algorithm.[10] Correction of unreadable characters could be incorporated to the algorithm easily as well.

Let be positions of unreadable characters. One creates polynomial localising these positions Set values on unreadable positions to 0 and compute the syndromes.

As we have already defined for the Forney formula let

Let us run extended Euclidean algorithm for locating least common divisor of polynomials and The goal is not to find the least common divisor, but a polynomial of degree at most and polynomials such that Low degree of guarantees, that would satisfy extended (by ) defining conditions for

Defining and using on the place of in the Fourney formula will give us error values.

The main advantage of the algorithm is that it meanwhile computes required in the Forney formula.

Explanation of the decoding process

[edit]

The goal is to find a codeword which differs from the received word minimally as possible on readable positions. When expressing the received word as a sum of nearest codeword and error word, we are trying to find error word with minimal number of non-zeros on readable positions. Syndrom restricts error word by condition

We could write these conditions separately or we could create polynomial

and compare coefficients near powers to

Suppose there is unreadable letter on position we could replace set of syndromes by set of syndromes defined by equation Suppose for an error word all restrictions by original set of syndromes hold, than

New set of syndromes restricts error vector

the same way the original set of syndromes restricted the error vector Except the coordinate where we have an is zero, if For the goal of locating error positions we could change the set of syndromes in the similar way to reflect all unreadable characters. This shortens the set of syndromes by

In polynomial formulation, the replacement of syndromes set by syndromes set leads to

Therefore,

After replacement of by , one would require equation for coefficients near powers

One could consider looking for error positions from the point of view of eliminating influence of given positions similarly as for unreadable characters. If we found positions such that eliminating their influence leads to obtaining set of syndromes consisting of all zeros, than there exists error vector with errors only on these coordinates. If denotes the polynomial eliminating the influence of these coordinates, we obtain

In Euclidean algorithm, we try to correct at most errors (on readable positions), because with bigger error count there could be more codewords in the same distance from the received word. Therefore, for we are looking for, the equation must hold for coefficients near powers starting from

In Forney formula, could be multiplied by a scalar giving the same result.

It could happen that the Euclidean algorithm finds of degree higher than having number of different roots equal to its degree, where the Fourney formula would be able to correct errors in all its roots, anyway correcting such many errors could be risky (especially with no other restrictions on received word). Usually after getting of higher degree, we decide not to correct the errors. Correction could fail in the case has roots with higher multiplicity or the number of roots is smaller than its degree. Fail could be detected as well by Forney formula returning error outside the transmitted alphabet.

Correct the errors

[edit]

Using the error values and error location, correct the errors and form a corrected code vector by subtracting error values at error locations.

Decoding examples

[edit]

Decoding of binary code without unreadable characters

[edit]

Consider a BCH code in GF(24) with and . (This is used in QR codes.) Let the message to be transmitted be [1 1 0 1 1], or in polynomial notation, The "checksum" symbols are calculated by dividing by and taking the remainder, resulting in or [ 1 0 0 0 0 1 0 1 0 0 ]. These are appended to the message, so the transmitted codeword is [ 1 1 0 1 1 1 0 0 0 0 1 0 1 0 0 ].

Now, imagine that there are two bit-errors in the transmission, so the received codeword is [ 1 0 0 1 1 1 0 0 0 1 1 0 1 0 0 ]. In polynomial notation:

In order to correct the errors, first calculate the syndromes. Taking we have and Next, apply the Peterson procedure by row-reducing the following augmented matrix.

Due to the zero row, S3×3 is singular, which is no surprise since only two errors were introduced into the codeword. However, the upper-left corner of the matrix is identical to [S2×2 | C2×1], which gives rise to the solution The resulting error locator polynomial is which has zeros at and The exponents of correspond to the error locations. There is no need to calculate the error values in this example, as the only possible value is 1.

Decoding with unreadable characters

[edit]

Suppose the same scenario, but the received word has two unreadable characters [ 1 0 0 ? 1 1 ? 0 0 1 1 0 1 0 0 ]. We replace the unreadable characters by zeros while creating the polynomial reflecting their positions We compute the syndromes and (Using log notation which is independent on GF(24) isomorphisms. For computation checking we can use the same representation for addition as was used in previous example. Hexadecimal description of the powers of are consecutively 1,2,4,8,3,6,C,B,5,A,7,E,F,D,9 with the addition based on bitwise xor.)

Let us make syndrome polynomial

compute

Run the extended Euclidean algorithm:

We have reached polynomial of degree at most 3, and as

we get

Therefore,

Let Don't worry that Find by brute force a root of The roots are and (after finding for example we can divide by corresponding monom and the root of resulting monom could be found easily).

Let

Let us look for error values using formula

where are roots of We get

Fact, that should not be surprising.

Corrected code is therefore [ 1 1 0 1 1 1 0 0 0 0 1 0 1 0 0].

Decoding with unreadable characters with a small number of errors

[edit]

Let us show the algorithm behaviour for the case with small number of errors. Let the received word is [ 1 0 0 ? 1 1 ? 0 0 0 1 0 1 0 0 ].

Again, replace the unreadable characters by zeros while creating the polynomial reflecting their positions Compute the syndromes and Create syndrome polynomial

Let us run the extended Euclidean algorithm:

We have reached polynomial of degree at most 3, and as

we get

Therefore,

Let Don't worry that The root of is

Let

Let us look for error values using formula where are roots of polynomial

We get

The fact that should not be surprising.

Corrected code is therefore [ 1 1 0 1 1 1 0 0 0 0 1 0 1 0 0].

Citations

[edit]
  1. ^ Reed & Chen 1999, p. 189
  2. ^ Hocquenghem 1959
  3. ^ Bose & Ray-Chaudhuri 1960
  4. ^ "Phobos Lander Coding System: Software and Analysis" (PDF). Archived (PDF) from the original on 2022-10-09. Retrieved 25 February 2012.
  5. ^ Marelli, Alessia; Micheloni, Rino (2018). "BCH Codes for Solid-State-Drives". Inside Solid State Drives (SSDS). Springer Series in Advanced Microelectronics. Vol. 37. pp. 369–406. doi:10.1007/978-981-13-0599-3_11. ISBN 978-981-13-0598-6. Retrieved 23 September 2023.
  6. ^ Gill n.d., p. 3
  7. ^ Lidl & Pilz 1999, p. 229
  8. ^ Gorenstein, Peterson & Zierler 1960
  9. ^ Gill n.d., p. 47
  10. ^ Yasuo Sugiyama, Masao Kasahara, Shigeichi Hirasawa, and Toshihiko Namekawa. A method for solving key equation for decoding Goppa codes. Information and Control, 27:87–99, 1975.

References

[edit]

Further reading

[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
In coding theory, BCH codes (Bose–Chaudhuri–Hocquenghem codes) are a prominent class of cyclic error-correcting codes designed to detect and correct multiple random errors in block-based data transmission and storage systems. These codes operate over finite fields, typically binary Galois fields GF(2^m), and are constructed such that their generator polynomial is the least common multiple of the minimal polynomials of consecutive powers of a primitive element in the field, ensuring a minimum Hamming distance of at least 2t + 1 to correct up to t errors. For primitive binary BCH codes, the block length is n = 2^m - 1, the dimension k satisfies n - k ≤ mt, and they generalize single-error-correcting Hamming codes to handle multiple errors efficiently. The codes were independently discovered in the late : French Alexis Hocquenghem introduced the concept in 1959 during his work on cyclic codes, while Indian Raj Chandra Bose and Dwijendra Kumar Ray-Chaudhuri developed them in 1960 as a class of error-correcting binary group codes. This simultaneous invention highlighted their foundational role in algebraic , with early constructions relying on properties of Galois fields to bound the error-correcting capability via the BCH bound. Narrow-sense BCH codes, a common subclass, use consecutive powers starting from the first, simplifying encoding and decoding processes like computation and error location via Berlekamp-Massey algorithms. BCH codes have been widely applied in practical systems due to their balance of error correction strength and computational efficiency, including satellite communications, devices, and early standards. Notable examples include the double-error-correcting BCH(15,7) code with minimum distance 5 and the triple-error-correcting BCH(15,5) code with distance 7, both over GF(2^4). Their cyclic structure enables efficient hardware implementations using linear feedback shift registers for encoding, while decoding leverages syndrome-based methods to locate and correct errors without exhaustive search.

Introduction

Definition

A BCH code, named after its inventors, is a subclass of cyclic codes defined over a Fq\mathbb{F}_q (also denoted GF(q)), where qq is a . Specifically, a BCH code of length nn and designed distance δ\delta is the cyclic code generated by the polynomial g(x)g(x) that is the least common multiple of the minimal polynomials over Fq\mathbb{F}_q of the elements αb,αb+1,,αb+δ2\alpha^b, \alpha^{b+1}, \dots, \alpha^{b+\delta-2}, where α\alpha is a primitive nnth root of unity in the extension field Fqm\mathbb{F}_{q^m} for some positive integer mm, and nn divides qm1q^m - 1. The integer b0b \geq 0 specifies the starting point of the consecutive powers; when b=1b = 1, the code is called narrow-sense, while general BCH codes allow arbitrary bb. This construction ensures the code has roots at these consecutive powers of α\alpha, providing a designed minimum distance of at least δ\delta. The generator is formally given by g(x)=lcm[Mαb(x),Mαb+1(x),,Mαb+δ2(x)],g(x) = \mathrm{lcm} \left[ M_{\alpha^b}(x), M_{\alpha^{b+1}}(x), \dots, M_{\alpha^{b+\delta-2}}(x) \right], where Mβ(x)M_{\beta}(x) denotes the minimal polynomial of β\beta over Fq\mathbb{F}_q. The degree of g(x)g(x) determines the redundancy of the , and thus its kk satisfies k=ndeg(g(x))k = n - \deg(g(x)). A key parameter is the error-correcting capability t=(δ1)/2t = \lfloor (\delta - 1)/2 \rfloor, and the is bounded below by knmtk \geq n - m t, reflecting the fact that each minimal polynomial has degree at most mm. The actual minimum distance dd of the satisfies dδd \geq \delta, though it may exceed the designed value in some cases. Primitive BCH codes form an important special case where n=qm1n = q^m - 1 and α\alpha is a primitive element of Fqm\mathbb{F}_{q^m}, ensuring the code operates over the full of the extension field. This setup is common for binary BCH codes (q=2q=2) with n=2m1n = 2^m - 1, but the definition extends naturally to non-binary alphabets. In contrast to general cyclic codes, the BCH construction targets a specific set of consecutive roots to guarantee the designed distance bound via the BCH bound on cyclic codes.

Historical Development

The BCH code, a class of cyclic error-correcting codes capable of correcting multiple random errors, was independently proposed in 1959 by French mathematician Alexis Hocquenghem and in 1960 by Indian mathematicians and Dwijendra Kumar Ray-Chaudhuri. Hocquenghem introduced the concept in his paper "Codes correcteurs d'erreurs," published in the French journal Chiffres, where he described a method to construct codes that generalize the single-error-correcting Hamming codes to handle multiple errors within the framework of cyclic codes over finite fields. This work laid the groundwork for systematic multiple-error correction, building on the algebraic structure of cyclic codes to ensure designed minimum distances. Bose and Ray-Chaudhuri, working separately, developed a similar construction focused initially on binary codes, detailed in their 1960 paper "On a Class of Error Correcting Binary Group Codes" published in Information and Control. Their approach emphasized the use of parity-check matrices derived from consecutive powers of a primitive element in the Galois field, enabling the correction of up to t errors for arbitrary t. The acronym BCH, combining the initials of Bose, Chaudhuri (an alternate spelling of Ray-Chaudhuri), and Hocquenghem, was adopted in 1960 to honor these independent discoveries. This naming reflected the convergence of their ideas, which extended the Hamming code's parity-check principle to achieve higher error-correction capabilities in cyclic codes suitable for practical communication systems. The initial formulations were primarily for binary alphabets, but the algebraic framework naturally lent itself to extensions over non-binary finite fields, broadening the applicability of BCH codes. Shortly after, in 1960, Irving S. Reed and Gustave Solomon introduced Reed-Solomon codes, which are a special case of non-binary primitive BCH codes with symbols from (q) where the block length equals q-1. These developments solidified BCH codes as a cornerstone of , influencing subsequent advancements in error correction for and transmission. The codes' influence is evident in their widespread adoption and the foundational role they played in the evolution of algebraic coding techniques.

Mathematical Background

Finite Fields and Primitive Polynomials

Finite fields, also known as Galois fields and denoted GF(q), are fields with exactly q elements where q = p^m for a prime p and positive integer m. These fields exist and are unique up to for each such q, and their characteristic is p. The additive group of GF(q) is elementary abelian of order q, while the GF(q)^* is cyclic of order q-1, generated by any primitive element. Extension fields GF(q^m) are constructed as vector spaces over the base field GF(q) of dimension m, often via adjoining a root of an of degree m over GF(q). In GF(q^m), the remains cyclic of order q^m - 1, and a primitive element α is a generator of this group, meaning the powers α^0, α^1, ..., α^{q^m - 2} yield all nonzero elements. Such primitive elements exist in every , as guaranteed by the structure of cyclic groups of order q^m - 1. A primitive over (q) is a monic irreducible of degree m whose in the extension field (q^m) are primitive elements. These polynomials are used to represent elements of (q^m) as polynomials of degree less than m with coefficients in (q), with performed the primitive . Over (q), the x^n - 1 factors as a product of cyclotomic polynomials Φ_d(x) for d dividing n, where each Φ_d(x) further factors into irreducible factors corresponding to the minimal polynomials of primitive d-th of unity in appropriate extension fields. The minimal polynomial M_α(x) of an element α ∈ GF(q^m) over GF(q) is the monic of least degree having α as a ; its degree equals the degree of the extension generated by α over GF(q). For β ∈ GF(q^m), the conjugates of β over GF(q) are the elements β, β^q, β^{q^2}, ..., β^{q^{d-1}}, where d is the degree of the minimal polynomial of β over GF(q); these are the images of β under the Frobenius automorphisms x ↦ x^q.

Cyclic Codes Fundamentals

A cyclic code of length nn over the finite field GF(q)\mathrm{GF}(q) is a linear block code invariant under cyclic shifts of its codewords, meaning that if (c0,c1,,cn1)(c_0, c_1, \dots, c_{n-1}) is a codeword, then (cn1,c0,c1,,cn2)(c_{n-1}, c_0, c_1, \dots, c_{n-2}) is also a codeword. Algebraically, such a code corresponds to an ideal in the quotient ring R=GF(q)/(xn1)R = \mathrm{GF}(q) / (x^n - 1), where elements of RR are polynomials of degree less than nn with coefficients in GF(q)\mathrm{GF}(q), and multiplication by xx induces the cyclic shift operation. The finite field GF(q)\mathrm{GF}(q) provides the coefficient alphabet for these polynomials, enabling the algebraic manipulation essential to the code's structure. The is uniquely determined by its monic generator g(x)g(x), which divides xn1x^n - 1 and has degree nkn - k, where kk is the of the (i.e., the number of symbols). All codewords are scalar multiples of g(x)g(x) in RR, expressed as c(x)=m(x)g(x)mod(xn1)c(x) = m(x) g(x) \mod (x^n - 1), where m(x)m(x) is a of degree less than kk. The parity-check is defined as h(x)=(xn1)/g(x)h(x) = (x^n - 1) / g(x), which has degree kk and generates the dual ; equivalently, the consists of all polynomials c(x)c(x) in RR satisfying c(x)h(x)0mod(xn1)c(x) h(x) \equiv 0 \mod (x^n - 1). Systematic representations of codewords can be obtained through division: for a m(x)m(x) of degree less than kk, the systematic codeword is formed by appending the of xnkm(x)x^{n-k} m(x) divided by g(x)g(x) to m(x)m(x). A fundamental property concerns the minimum dd, which measures the code's error-correcting capability. The Bose-Chaudhuri-Hocquenghem (BCH) bound states that if g(x)g(x) has δ1\delta - 1 consecutive roots α,α2,,αδ1\alpha, \alpha^2, \dots, \alpha^{\delta-1} (where α\alpha is a primitive nn-th in an extension field), then dδd \geq \delta. This bound arises because any nonzero codeword c(x)c(x), being divisible by g(x)g(x), vanishes at these roots, implying that c(x)c(x) cannot have less than δ\delta without contradicting the consecutive zero evaluations. In error correction, a received r(x)=c(x)+e(x)mod(xn1)r(x) = c(x) + e(x) \mod (x^n - 1) is decoded by estimating the error e(x)e(x), leveraging the code's root structure to locate . Cyclic codes admit a decomposition via idempotents in RR, which are elements e(x)e(x) satisfying e(x)2=e(x)mod(xn1)e(x)^2 = e(x) \mod (x^n - 1) and correspond to the irreducible factors of xn1x^n - 1. The code can be expressed as a of minimal ideals generated by these orthogonal idempotents, providing a natural partitioning into simpler subcodes. This ideal-theoretic structure, rooted in the ring's , explains why cyclic codes are well-suited to convolutional architectures, as the idempotent generators facilitate shift-invariant processing akin to convolutional encoding.

Code Construction

Primitive Narrow-Sense BCH Codes

Primitive narrow-sense BCH codes represent the standard form of BCH codes, defined over the finite field GF(q) with code length n = q^m - 1 for some integer m ≥ 2, where the consecutive roots of the generator polynomial begin at the first power of a primitive element α in GF(q^m). These codes are designed to have a specified designed distance δ ≥ 2, enabling correction of up to t = \lfloor (\delta - 1)/2 \rfloor errors, and are constructed as cyclic codes of length n over GF(q). The generator polynomial g(x) of a primitive narrow-sense BCH code is the least common multiple of the minimal polynomials m_i(x) over GF(q) of the elements α^i for i = 1, 2, ..., δ-1, where α is a primitive nth root of unity in GF(q^m). Thus, g(x)=lcm[m1(x),m2(x),,mδ1(x)],g(x) = \operatorname{lcm} \left[ m_1(x), m_2(x), \dots, m_{\delta-1}(x) \right], and the roots of g(x) include α, α^2, ..., α^{δ-1}, ensuring the code has no codewords of weight less than δ by the BCH bound on the minimum distance d ≥ δ. The k of the satisfies k = n - \deg(g(x)), where \deg(g(x)) ≤ m(δ-1) since each minimal m_i(x) has degree at most m, providing an upper bound on the of at most m(δ-1) symbols. In practice, the exact degree may be smaller if some minimal polynomials coincide, leading to k ≥ n - m(δ-1). For binary primitive narrow-sense BCH codes, q = 2 and α is chosen as a of an irreducible primitive of degree m over GF(2), yielding codes of n = 2^m - 1 that are widely used in applications requiring efficient multiple-error correction. A representative example is the binary primitive BCH code with m=4, n=15, δ=5 (t=2), where the generator is derived from the minimal polynomials of α, α^2, α^3, and α^4, resulting in k=7 and d=5.

General BCH Codes

General BCH codes generalize the primitive narrow-sense construction by allowing code lengths nn that divide qm1q^m - 1 for some integer m1m \geq 1, where nn need not equal qm1q^m - 1, and by permitting an arbitrary integer starting point b0b \geq 0 for the consecutive roots defining the code. This flexibility enables the BCH family to encompass a broader range of cyclic error-correcting codes over finite fields GF(qq), where qq is a prime power. To construct such a code, let α\alpha be a primitive element of the extension field GF(qmq^m), and let β=α(qm1)/n\beta = \alpha^{(q^m - 1)/n}, which has order nn in GF(qmq^m). The code is the cyclic code of length nn whose parity-check matrix HH has δ1\delta - 1 rows, where the jj-th row (for j=0,1,,δ2j = 0, 1, \dots, \delta - 2) consists of the elements 1,βbj,β2bj,,β(n1)bj1, \beta^{b j}, \beta^{2 b j}, \dots, \beta^{(n-1) b j}. The generator polynomial of the code is given by g(x)=lcm[mb(x),mb+1(x),,mb+δ2(x)],g(x) = \mathrm{lcm} \left[ m_b(x), m_{b+1}(x), \dots, m_{b + \delta - 2}(x) \right], where mi(x)m_i(x) denotes the minimal polynomial of αi\alpha^i over GF(qq), and δ\delta is the designed distance. The error-correcting capability is t=(δ1)/2t = \left\lfloor (\delta - 1)/2 \right\rfloor, allowing correction of up to tt errors. The dimension kk of the code satisfies knm(δ1)k \geq n - m (\delta - 1), and the BCH bound guarantees a minimum distance dδd \geq \delta. For example, consider a binary BCH code (q=2q = 2) of n=15n = 15, which divides 241=152^4 - 1 = 15, using m=4m = 4. Here, α\alpha is a root of a primitive polynomial of degree 4 over , such as x4+x+1=0x^4 + x + 1 = 0, and the proceeds with consecutive roots starting from an arbitrary bb, yielding parameters dependent on δ\delta (e.g., for δ=5\delta = 5, t=2t = 2, k1544=1k \geq 15 - 4 \cdot 4 = -1, though actual k=7k = 7). This setup demonstrates how the general form accommodates the full while allowing non-maximal nn in larger fields for other cases.

Special Cases

Binary BCH codes are constructed over the GF(2), where symbols are bits, and are typically primitive with block length n=2m1n = 2^m - 1 for some integer m3m \geq 3. These codes achieve a designed minimum of at least d=2t+1d = 2t + 1, where tt is the error-correcting capability, and the number of parity bits is at most mtmt. A representative example is the primitive binary BCH code with parameters (127, 120, 3), which has length n=127n = 127 (corresponding to m=7m = 7), k=120k = 120, and minimum dmin=3d_{\min} = 3, capable of correcting up to t=1t = 1 error. This code is widely used in applications requiring efficient single-error correction due to its optimal parameters among binary cyclic codes of similar length. Shortened BCH codes are derived from standard BCH codes by the block while preserving or enhancing the minimum relative to the original code's . The process involves setting a of symbols to zero and then puncturing (removing) those positions from the words, resulting in a code of n<nn' < n and k<kk' < k, but with dmindmind_{\min}' \geq d_{\min}. This technique is particularly effective for binary primitive BCH codes, yielding linear codes with superior minimum distances compared to previously known constructions for certain parameters. For instance, a binary BCH code can produce codes suitable for memory systems or communication channels where the block must be reduced without sacrificing error-correcting performance. Doubly-extended BCH codes are a variant obtained by specific extensions for enhanced error detection, such as in optical standards. A notable example is the double-extended Hamming code with parameters (128, 119, 4), used in ITU-T G.709.3 and for robust inner error correction, achieving single-error correction and double-error detection (SECDED). The single-error-correcting binary BCH code, designed with δ=3\delta = 3 (or equivalently t=1t = 1), is precisely the of length n=2m1n = 2^m - 1. In this case, the dimension is k=nmk = n - m, and the minimum distance is exactly 3, matching the perfect single-error-correcting properties of the . This equivalence highlights how BCH codes generalize the Hamming construction to multiple-error correction while retaining the cyclic structure for efficient encoding and decoding. Non-binary BCH codes are defined over finite fields GF(q) with q>2q > 2, allowing symbols from larger alphabets and enabling block lengths up to n=qm1n = q^m - 1. These codes maintain the BCH bound on minimum distance dminδd_{\min} \geq \delta but offer greater flexibility in symbol size, which is advantageous for channels with multilevel signaling. They find applications in modulation schemes, such as trellis-coded modulation and partial-response channels, where the larger symbol alphabet aligns with higher-order constellations to improve and error correction in constrained environments like digital storage or multi-frequency modulation systems. A subclass, such as Lee-metric BCH codes, further adapts to specific distance metrics for bitshift and error correction in (d,k)-constrained channels.

Properties

Code Parameters and Bounds

BCH codes are defined over a finite field Fq\mathbb{F}_q with parameters including the code length nn, which for primitive narrow-sense BCH codes is given by n=qm1n = q^m - 1, where mm is the smallest integer such that nn divides qm1q^m - 1. The dimension kk of the code is determined as k=ndeg(g(x))k = n - \deg(g(x)), where g(x)g(x) is the generator polynomial; since deg(g(x))m(δ1)\deg(g(x)) \leq m(\delta - 1) for a designed distance δ\delta, it follows that knm(δ1)k \geq n - m(\delta - 1). The code rate is then R=k/nR = k/n, which approaches 1 as δ\delta remains fixed while nn grows large. The minimum dd satisfies the BCH bound dδd \geq \delta, where δ\delta is the designed corresponding to δ1\delta - 1 consecutive roots of the generator in the extension field. This bound ensures that the code can correct up to t=(δ1)/2t = \lfloor (\delta - 1)/2 \rfloor errors, and more generally, the error-correcting capability is t=(d1)/2t = \lfloor (d - 1)/2 \rfloor. For many BCH codes, particularly binary primitive ones, the actual minimum equals the designed δ\delta, although it can exceed δ\delta in some cases, providing better error correction than initially designed. Refinements to the BCH bound exist, such as the Hartmann-Tzeng bound, which applies to cyclic codes with roots forming an of length δ1\delta - 1 with common difference coprime to nn and additional structured zeros, yielding dδ+sd \geq \delta + s for some s1s \geq 1 under specific conditions on the code parameters. This bound improves upon the standard BCH bound for certain non-consecutive root configurations while maintaining the cyclic structure. In comparison to the Singleton bound, which states that dnk+1d \leq n - k + 1 for any [n,k,d][n, k, d] code, BCH codes achieve equality—making them maximum distance separable (MDS)—only in trivial cases, such as the full space or repetition codes; non-trivial BCH codes, especially binary ones, fall short of this bound due to their dimension constraints relative to δ\delta.

Duality and Generator Polynomials

The dual code of a BCH code, as a subclass of s, inherits a cyclic structure, with its generator derived from the reciprocal of the parity-check of the primal code. For a CC generated by g(x)g(x) of degree nkn - k, the parity-check is h(x)=(xn1)/g(x)h(x) = (x^n - 1)/g(x), and the generator of the dual code CC^\perp is g(x)=xkh(1/x)g^\perp(x) = x^k h(1/x), where the reciprocal operation ensures monicity by scaling if necessary. This relation holds generally for s and applies directly to BCH codes, yielding a dual of nkn - k. In primitive narrow-sense BCH codes, the generator g(x)g(x) is the of the minimal polynomials of αi\alpha^i for i=1,2,,δ1i = 1, 2, \dots, \delta - 1, where α\alpha is a primitive element of the extension field and δ\delta is the designed . Consequently, h(x)h(x) has at αi\alpha^i for i=δ,δ+1,,n1i = \delta, \delta + 1, \dots, n-1, making the of g(x)g^\perp(x) the reciprocals αi\alpha^{-i} for those ii. Since αi=αni\alpha^{-i} = \alpha^{n-i} and the indices nin-i range from 11 to nδn - \delta, the dual code possesses consecutive α1,α2,,αnδ\alpha^1, \alpha^2, \dots, \alpha^{n-\delta}, rendering it a narrow-sense BCH code with designed nδ+1n - \delta + 1. For general BCH codes with starting index b>1b > 1, the dual's defining set is the complement of the negatives of the original defining set modulo nn, often resulting in a BCH-like structure but not always with consecutive . The weight distribution of dual BCH codes is known explicitly for specific cases, particularly primitive binary BCH codes with small designed distances. For instance, the dual of the double-error-correcting primitive binary BCH code of length n=2m1n = 2^m - 1 (designed distance δ=5\delta = 5) has a simple weight enumerator when mm is odd: all nonzero codewords have weights 2m12(m1)/22^{m-1} - 2^{(m-1)/2}, 2m12^{m-1}, or 2m1+2(m1)/22^{m-1} + 2^{(m-1)/2}, with the number of codewords AwA_w at weight w=2m1±2(m1)/2w = 2^{m-1} \pm 2^{(m-1)/2} given by Aw=2m2(2m1)(2(m+1)/21)/(2(m+3)/2±1)A_w = 2^{m-2} (2^m - 1) (2^{(m+1)/2} \mp 1) / (2^{(m+3)/2} \pm 1) and at w=2m1w = 2^{m-1} by Aw=(2m1)2m1A_w = (2^m - 1) 2^{m-1}. Similar closed-form expressions exist for even mm, involving additional weights, and these distributions facilitate applications like undetected error probability calculations. For higher designed distances, bounds such as the Carlitz-Uchiyama inequality provide limits on minimum weights, e.g., w2m1(t1)2m/2|w - 2^{m-1}| \leq (t-1) 2^{m/2} for duals of codes correcting tt errors, with improvements for certain parameter ranges. BCH codes, being cyclic, admit idempotent generators in the quotient ring Fq/(xn1)\mathbb{F}_q/(x^n - 1), where the primitive idempotent e(x)e(x) generates the code as a principal ideal. For general cyclic codes, e(x)=iT1nχ(αi)0χ1(αi)Mi(x)e(x) = \sum_{i \in T} \frac{1}{n} \sum_{\chi(\alpha^i) \neq 0} \chi^{-1}(\alpha^i) M_i(x), with TT the defining set and Mi(x)M_i(x) the ii-th cyclotomic polynomial, but BCH codes benefit from simplifications due to consecutive defining sets T={b,b+1,,b+δ2}T = \{b, b+1, \dots, b+\delta-2\}, allowing efficient computation via partial sums of geometric series in the character sums. This structure aids in theoretical analyses of code ideals without altering the generator polynomial form.

Encoding

Systematic Encoding

Systematic encoding of BCH codes produces codewords where the original message bits appear unchanged as the leading kk symbols, facilitating straightforward message recovery after decoding. This approach leverages the cyclic nature of BCH codes, treating the message as a polynomial m(x)m(x) of degree less than kk, where kk is the dimension of the code. The generator polynomial g(x)g(x), defined during code construction as the least common multiple of minimal polynomials over consecutive powers of a primitive element in the extension field GF(2m)\mathrm{GF}(2^m), determines the parity-check structure. The encoding procedure begins by shifting the message polynomial to align with the codeword length nn, forming m(x)xnkm(x) x^{n-k}. The parity polynomial r(x)r(x) is then computed as the remainder of this shifted message divided by g(x)g(x): r(x)=m(x)xnkmodg(x)r(x) = m(x) x^{n-k} \mod g(x) The systematic codeword polynomial is obtained by adding the parity to the shifted message (addition over GF(2)\mathrm{GF}(2)): c(x)=m(x)xnk+r(x)c(x) = m(x) x^{n-k} + r(x) This ensures c(x)c(x) is divisible by g(x)g(x) and has length nn, with the coefficients of m(x)m(x) appearing directly in the high-degree terms of c(x)c(x). Equivalently, c(x)c(x) can be viewed as the unique multiple of g(x)g(x) of degree less than nn that matches m(x)xnkm(x) x^{n-k} in the first nkn-k positions when adjusted modulo xn1x^n - 1. In matrix representation, the GG for systematic encoding is a k×nk \times n matrix of the form [IkP][I_k \mid P], where IkI_k is the k×kk \times k and PP is the k×(nk)k \times (n-k) parity submatrix derived from the coefficients of g(x)g(x) and its cyclic shifts. The codeword vector c\mathbf{c} is then c=mG\mathbf{c} = \mathbf{m} G, with m\mathbf{m} the message vector, ensuring the first kk bits of c\mathbf{c} are identical to m\mathbf{m}. The entries of PP are obtained by performing row operations on the nonsystematic formed by cyclic shifts of g(x)g(x). This systematic form simplifies implementation using linear feedback shift registers for polynomial division and offers the advantage of direct message extraction from the decoded codeword without additional processing, which is particularly beneficial in hardware realizations of BCH encoders.

Non-Systematic Encoding

Non-systematic encoding of BCH codes constructs the codeword polynomial c(x)c(x) as the product c(x)=m(x)q(x)c(x) = m(x) \cdot q(x), where m(x)m(x) is the message polynomial of degree less than the dimension kk, and q(x)q(x) is selected such that c(x)c(x) is divisible by the generator polynomial g(x)g(x) and has degree less than the code length nn. In the standard approach, q(x)=g(x)q(x) = g(x), the monic polynomial of degree nkn - k that divides xn1x^n - 1 and incorporates the minimal polynomials of the designed roots α,α2,,α2t\alpha, \alpha^2, \dots, \alpha^{2t} in the extension field GF(2m)\mathrm{GF}(2^m), where α\alpha is a primitive element, tt is the error-correcting capability, and n=2m1n = 2^m - 1 for primitive codes. This multiplication ensures c(αi)=0c(\alpha^i) = 0 for i=1,2,,2ti = 1, 2, \dots, 2t, satisfying the parity-check conditions inherent to BCH codes. To find q(x)q(x), one solves for coefficients satisfying m(x)q(x)0(modg(x))m(x) q(x) \equiv 0 \pmod{g(x)}, which, given the coprimality assumptions on m(x)m(x) and g(x)g(x), typically yields q(x)q(x) as a multiple of g(x)g(x); computationally, this is realized through direct polynomial multiplication over GF(2)\mathrm{GF}(2), equivalent to solving the defined by the GG (an n×kn \times k derived from g(x)g(x)) such that cT=GmT\mathbf{c}^T = G \mathbf{m}^T. This method preserves the cyclic structure, as g(x)g(x) divides xn1x^n - 1. Non-systematic encoding is particularly advantageous in hardware implementations, where polynomial multiplication by g(x)g(x) can be efficiently performed using linear feedback shift registers (LFSRs) configured to match the feedback taps of g(x)g(x), requiring minimal resources compared to division-based alternatives in certain FPGA or ASIC designs. For instance, in a (15,7) BCH encoder on Spartan 3E FPGA, the LFSR-based non-systematic approach completes encoding in 15 clock cycles with low power consumption (approximately 152 μW). This encoding yields the same code rate k/nk/n as systematic forms but results in codewords where and parity symbols are interspersed, potentially complicating direct message extraction without decoding, though it aligns well with the algebraic properties of cyclic codes like BCH.

Decoding

Syndrome Computation

In the decoding of BCH codes, computation serves as the initial step to assess the presence and nature of in the received word. For a received r(x)=c(x)+e(x)r(x) = c(x) + e(x), where c(x)c(x) is the transmitted codeword and e(x)e(x) is the , the syndromes are defined as the evaluations sj=r(αj)s_j = r(\alpha^j) for j=b,b+1,,b+2tj = b, b+1, \dots, b+2t, with α\alpha a primitive element of the extension field GF(2m)\mathrm{GF}(2^m) and bb the starting exponent from the code construction. Since codewords satisfy c(αj)=0c(\alpha^j) = 0 for these , the syndromes simplify to sj=e(αj)s_j = e(\alpha^j), providing a compact representation of the pattern independent of the valid codeword. A BCH code designed to correct up to tt errors requires exactly 2t2t syndromes, corresponding to the designed d=2t+1d = 2t+1, which ensures the of error patterns with weight at most tt. These syndromes form a vector in the extension field, capturing the in a form suitable for subsequent steps like error locator determination. Expressing the syndromes in terms of the error pattern, assume vtv \leq t errors occur at positions ili_l with values ylGF(2m)y_l \in \mathrm{GF}(2^m), so e(x)=l=1vylxile(x) = \sum_{l=1}^v y_l x^{i_l} and the error locations are βl=αil\beta_l = \alpha^{i_l}. Then, each is given by sj=l=1vylβljs_j = \sum_{l=1}^v y_l \beta_l^j for j=b,,b+2tj = b, \dots, b+2t, forming a system of nonlinear equations over the field that encodes both locations and magnitudes of the errors. In the binary case, where the code operates over GF(2)\mathrm{GF}(2) and error values are yl=1y_l = 1, the syndromes relate through the field's squaring automorphism: s2i=l=1vβl2i=(l=1vβli)2=si2s_{2i} = \sum_{l=1}^v \beta_l^{2i} = \left( \sum_{l=1}^v \beta_l^i \right)^2 = s_i^2. This property halves the independent computations needed for even-powered syndromes, enhancing efficiency in binary BCH decoding. The computational complexity of syndrome evaluation is linear in the code length nn, requiring O(n)O(n) field multiplications and additions to compute each sjs_j via direct Horner's method or polynomial evaluation. In fields supporting fast Fourier transform analogs, such as using cyclotomic cosets, the overall evaluation can achieve O(nlogn)O(n \log n) time, though standard implementations often rely on O(n2t)O(n \cdot 2t) operations for practicality.

Error-Locator Polynomial Calculation

In the algebraic decoding of BCH codes, the error-locator polynomial Λ(x)\Lambda(x) is determined from the computed syndromes to identify the positions of errors in the received word. Defined as Λ(x)=i=1v(1βix)\Lambda(x) = \prod_{i=1}^{v} (1 - \beta_i x), where vtv \leq t is the actual number of errors (with tt the code's error-correcting capability), and the βi=αji\beta_i = \alpha^{j_i} are the locators corresponding to the error positions jij_i (with α\alpha a primitive element of the extension field F2m\mathbb{F}_{2^m}), this has degree vv and coefficients that are the elementary symmetric sums σk\sigma_k of the βi\beta_i, expressed as Λ(x)=k=0v(1)kσkxk\Lambda(x) = \sum_{k=0}^{v} (-1)^k \sigma_k x^k with σ0=1\sigma_0 = 1. For binary BCH codes, the standard method to compute Λ(x)\Lambda(x) is the Berlekamp-Massey algorithm, which efficiently finds the minimal-degree satisfying the syndrome constraints in O(t2)O(t^2) field operations. The algorithm processes the sequence of odd-powered S1=s1,S3=s3,,S2t1=s2t1S_1 = s_1, S_3 = s_3, \dots, S_{2t-1} = s_{2t-1} (with even syndromes derived as s2i=si2s_{2i} = s_i^2) iteratively. It maintains a current locator Λ(m)(x)\Lambda^{(m)}(x) and an auxiliary polynomial, updating them based on discrepancies Δm=S2m1+j=1dmΛj(m)S2m1j\Delta_m = S_{2m-1} + \sum_{j=1}^{d_m} \Lambda_j^{(m)} S_{2m-1-j}, where dm=degΛ(m)d_m = \deg \Lambda^{(m)}. If Δm0\Delta_m \neq 0, the polynomial is revised as Λ(m+1)(x)=Λ(m)(x)ΔmxmlB(x)/Δl\Lambda^{(m+1)}(x) = \Lambda^{(m)}(x) - \Delta_m x^{m - l} B(x) / \Delta_l, with B(x)B(x) the previous auxiliary and ll the last update step. The process continues until m=tm = t, yielding Λ(x)\Lambda(x) of degree vtv \leq t, with vv determined as the final degree where higher discrepancies vanish. This approach handles the characteristic 2 field correctly without division issues. A key property of Λ(x)\Lambda(x) is that its are the reciprocals of the error locators, i.e., Λ(βi1)=0\Lambda(\beta_i^{-1}) = 0 for each ii, since substituting x=βi1x = \beta_i^{-1} yields a factor of zero in the product form. The coefficients σk\sigma_k can thus be solved to find the minimal-degree satisfying the relations up to degree tt. This ensures the polynomial uniquely locates the errors when vtv \leq t, with uniqueness guaranteed by the code's designed .

Root Finding and Error Locations

Once the error-locator polynomial Λ(x)\Lambda(x) of degree vtv \leq t has been determined, its roots must be found to identify the error positions in the received codeword. The roots of Λ(x)\Lambda(x) are given by x=βi1x = \beta_i^{-1}, where βi=αli\beta_i = \alpha^{l_i} are the error location numbers corresponding to the error positions lil_i (with 1lin1 \leq l_i \leq n) and α\alpha is a primitive element of the Galois field GF(2m)\mathrm{GF}(2^m). Equivalently, Λ(αli)=0\Lambda(\alpha^{-l_i}) = 0. The primary method for locating these roots in BCH decoding is the Chien search algorithm, which systematically evaluates Λ(x)\Lambda(x) at the points x=αjx = \alpha^{-j} for j=1,2,,nj = 1, 2, \dots, n. A root is found at position jj if Λ(αj)=0\Lambda(\alpha^{-j}) = 0, indicating an error at that codeword position. This approach, introduced by R. T. Chien, exploits the cyclic structure of BCH codes and requires no factorization of the polynomial over the finite field. To perform the evaluation, Λ(x)=k=0vΛkxk\Lambda(x) = \sum_{k=0}^{v} \Lambda_k x^k is computed directly at each trial point, with the powers of αj\alpha^{-j} generated iteratively (e.g., starting from α1\alpha^{-1} and multiplying by α1\alpha^{-1} each step). The time complexity of the Chien search is O(nt)O(nt), as each of the nn evaluations involves O(t)O(t) field multiplications and additions. This makes it particularly suitable for hardware implementations in binary BCH codes, where parallel architectures can reduce latency through simultaneous testing of multiple positions. For cases involving multiple roots (multiplicity greater than 1, which may arise in extended BCH designs or non-binary settings with v>1v > 1 errors at the same position), the standard Chien search can be augmented by computing the of Λ(x)\Lambda(x) and its Λ(x)\Lambda'(x) to resolve multiplicities, though such scenarios are atypical in primitive binary BCH codes focused on simple error correction. The Berlekamp-Massey algorithm computes the locator polynomial from syndromes, and while some unified frameworks integrate root-finding, the Chien search remains the dominant choice for BCH codes due to its simplicity and efficiency in practice.

Error Value Estimation

Once the error locations βl\beta_l (for l=1,,vl = 1, \dots, v) have been determined from the roots of the error-locator polynomial, the corresponding error values yly_l are computed by solving a derived from the syndromes. The relevant syndromes satisfy the equations sj=l=1vylβlj,j=1,2,,v,s_j = \sum_{l=1}^v y_l \beta_l^j, \quad j = 1, 2, \dots, v, where vv is the number of errors (assumed t\leq t, the designed error-correcting capability) and each ylGF(q)y_l \in \mathrm{GF}(q) is the nonzero error magnitude at location βl\beta_l. This system can be expressed in matrix form as Vy=s\mathbf{V} \mathbf{y} = \mathbf{s}, where s=(s1,,sv)T\mathbf{s} = (s_1, \dots, s_v)^T, y=(y1,,yv)T\mathbf{y} = (y_1, \dots, y_v)^T, and V\mathbf{V} is the v×vv \times v with entries Vj,l=βljV_{j,l} = \beta_l^j. Since the error locations βl\beta_l are distinct elements of the extension field, V\mathbf{V} is invertible over GF(q)\mathrm{GF}(q), and the unique solution is y=V1s\mathbf{y} = \mathbf{V}^{-1} \mathbf{s}. Solving the system via direct matrix inversion requires O(v3)O(v^3) field operations, though the Toeplitz-like structure of V\mathbf{V} permits faster methods, such as O(v2)O(v^2) algorithms based on fast interpolation or division techniques. In the special case of binary BCH codes over GF(2)\mathrm{GF}(2), the error values are always yl=1y_l = 1 (corresponding to bit flips), so estimation reduces to adding 1 (modulo 2) at each known error location, with no linear system to solve.

Alternative Decoding via Euclidean Algorithm

An alternative decoding method for BCH codes employs the to simultaneously compute the error-locator polynomial Λ(x)\Lambda(x) and the error-evaluator polynomial Ω(x)\Omega(x) from the syndrome polynomial S(x)S(x). This approach solves the key equation Λ(x)S(x)Ω(x)(modx2t)\Lambda(x) S(x) \equiv \Omega(x) \pmod{x^{2t}}, where tt is the error-correction capability, degΛ(x)t\deg \Lambda(x) \leq t, and degΩ(x)<degΛ(x)\deg \Omega(x) < \deg \Lambda(x). The syndrome polynomial is formed as S(x)=j=12tsjxj1S(x) = \sum_{j=1}^{2t} s_j x^{j-1}, where the sjs_j are the computed syndromes from the received word. The is applied to the pair (x2t,S(x))(x^{2t}, S(x)), performing successive divisions to generate until the degree of the falls below tt. At this stopping condition, the polynomials from the extended form yield Λ(x)\Lambda(x) as the coefficient of S(x)S(x) (normalized by its constant term) and Ω(x)\Omega(x) as the (similarly normalized), ensuring they satisfy the key equation. Once Λ(x)\Lambda(x) and Ω(x)\Omega(x) are obtained, the roots βl\beta_l of Λ(x)\Lambda(x) (found via methods such as the Chien search) identify the error positions. The corresponding error values yly_l are then estimated using Forney's formula: yl=Ω(βl)βlΛ(βl)y_l = \frac{\Omega(\beta_l)}{\beta_l \Lambda'(\beta_l)}. This integration allows direct computation of error magnitudes without separate evaluator steps. This Euclidean-based method provides a unified framework for decoding, enabling detection of error patterns exceeding tt errors by continuing the algorithm to find the greatest common divisor. Its computational complexity is O(t2)O(t^2), dominated by polynomial multiplications and divisions in the finite field.

Error Correction Steps

Once the error locations lil_i and corresponding error values yiy_i (for i=1,2,,vi = 1, 2, \dots, v, where vv is the number of detected errors) have been determined from prior decoding steps, the final correction procedure constructs the error pattern and subtracts it from the received word to obtain the corrected codeword. The error pattern is represented as the polynomial e(x)=i=1vyixlie(x) = \sum_{i=1}^v y_i x^{l_i}, where the exponents lil_i indicate the positions of the errors (typically indexed from 0 to n1n-1, with nn the code length) and the coefficients yiGF(q)y_i \in \mathrm{GF}(q) are the error magnitudes in the underlying finite field. The corrected codeword polynomial is then given by c(x)=r(x)e(x)(modxn1),c'(x) = r(x) - e(x) \pmod{x^n - 1}, where r(x)r(x) is the received polynomial and all operations are performed in the finite field GF(q)\mathrm{GF}(q). In vector form, this corresponds to c=re\mathbf{c}' = \mathbf{r} - \mathbf{e}, where ej=yke_j = y_k if j=lkj = l_k for some kk, and ej=0e_j = 0 otherwise; for binary BCH codes over GF(2)\mathrm{GF}(2), subtraction reduces to addition (XOR) since error values are 1 at error positions. If the number of detected errors vv exceeds the code's error-correcting capability tt, the decoder declares the received word uncorrectable to avoid propagating incorrect corrections. For systematic BCH codes, post-processing involves extracting the symbols directly from the first kk positions (or coefficients) of c(x)c'(x), where kk is the dimension of the code. In cases where the actual number of errors exceeds tt but the decoder detects vtv \leq t errors (possible due to the designed minimum distance δ=2t+1\delta = 2t + 1), miscorrection can occur, resulting in an undetected erroneous codeword with weight less than δ\delta.

Examples

Primitive BCH Code Illustration

A concrete example of a primitive binary BCH code is the (15,7,5) code defined over the GF(2^4), with length n=15n = 15, k=7k = 7, and designed minimum distance δ=5\delta = 5, capable of correcting up to t=2t = 2 errors. This code is constructed as a narrow-sense , where the field elements are represented as polynomials modulo the primitive polynomial p(x)=x4+x+1p(x) = x^4 + x + 1 over GF(2), which is irreducible and has order 15. Let α\alpha be a primitive element (root) of p(x)p(x), so the powers α0,α1,,α14\alpha^0, \alpha^1, \dots, \alpha^{14} form the nonzero elements of GF(16), and the code length corresponds to the field order minus one. The generator polynomial g(x)g(x) is the monic polynomial of least degree with roots α,α2,α3,α4\alpha, \alpha^2, \alpha^3, \alpha^4 in GF(16), ensuring the designed distance δ=5\delta = 5. In the binary case, due to the Frobenius automorphism, the minimal polynomials suffice for the conjugacy classes: the minimal polynomial of α\alpha (covering α,α2,α4,α8\alpha, \alpha^2, \alpha^4, \alpha^8) is m1(x)=x4+x+1m_1(x) = x^4 + x + 1, and the minimal polynomial of α3\alpha^3 (covering α3,α6,α12,α9\alpha^3, \alpha^6, \alpha^{12}, \alpha^9) is m3(x)=x4+x3+x2+x+1m_3(x) = x^4 + x^3 + x^2 + x + 1. Thus, g(x)=lcm[m1(x),m3(x)]=m1(x)m3(x)=x8+x7+x6+x4+1g(x) = \mathrm{lcm}[m_1(x), m_3(x)] = m_1(x) \cdot m_3(x) = x^8 + x^7 + x^6 + x^4 + 1, which has degree 8, confirming the dimension k=ndeg(g(x))=7k = n - \deg(g(x)) = 7. The codewords are multiples of g(x)g(x) modulo x15+1x^{15} + 1, and the systematic GG is a 7×157 \times 15 binary matrix of the form [I7P][I_7 \mid P], where I7I_7 is the 7×77 \times 7 and PP is the 7×87 \times 8 parity-check matrix derived from powers of g(x)g(x). The BCH bound guarantees that the minimum dδ=5d \geq \delta = 5, as the has δ1=4\delta - 1 = 4 consecutive αb,,αb+δ2\alpha^b, \dots, \alpha^{b+\delta-2} (here b=1b=1) in the extension field, ensuring no codeword of weight less than 5 exists; in this case, the actual d=5d = 5. This bound follows directly from the , where any nonzero codeword of weight less than δ\delta would contradict the root conditions via the properties.

Decoding Examples

To illustrate the decoding process for binary BCH codes, consider specific numerical examples that demonstrate syndrome computation, error-locator determination using the Peterson-Gorenstein-Zierler (PGZ) method, root finding via the Chien search, and error correction. These examples assume operations in the appropriate extension field GF(2^m), with a primitive element α satisfying the field's . In binary codes, error values are always 1, simplifying the Forney formula to direct bit flips at located positions.

Example 1: Single Error in Binary BCH(7,4,3) Code

The binary BCH(7,4,3) code, equivalent to the over (8) with primitive polynomial x3+x+1=0x^3 + x + 1 = 0, corrects up to one error. Suppose the all-zero codeword has a single error at position 3, yielding the received r(x)=x3r(x) = x^3. Positions are indexed from 0 () to 6 (highest degree). Compute the using the root α (for designed distance 3, t=1):
  • s1=r(α)=α3s_1 = r(\alpha) = \alpha^3
SyndromeValue
s1s_1α3\alpha^3
Since t=1, the PGZ method yields the error-locator polynomial σ(x)=x+s1=x+α3\sigma(x) = x + s_1 = x + \alpha^3. The Chien search evaluates σ at α^{-j} for j=0 to 6, finding a root at α^{-3} (position 3), as σ(α3)=α3+α3=0\sigma(\alpha^{-3}) = \alpha^{-3} + \alpha^3 = 0 (noting α^7=1, and in GF(2), -1=1). The Forney value is y=1 (binary case). Correct by flipping bit 3: from 1 to 0, yielding corrected codeword c^=(0,0,0,0,0,0,0)\hat{c} = (0, 0, 0, 0, 0, 0, 0).

Example 2: Two Errors in Binary BCH(15,7,5) Code

The binary BCH(15,7,5) over GF(16) with primitive x4+x+1=0x^4 + x + 1 = 0 corrects up to two errors. Consider the received r(x)=x10+x9+x6+x5+x+1r(x) = x^{10} + x^9 + x^6 + x^5 + x + 1, corresponding to binary coefficients from degree 14 to 0: (0,0,0,0,1,1,0,0,1,1,0,0,0,1,1). Errors occurred at positions 4 and 10. Syndromes (using roots α to α^3 for t=2, but up to s4 for PGZ):
  • s1=r(α)=α2s_1 = r(\alpha) = \alpha^2
  • s2=r(α3)=α4s_2 = r(\alpha^3) = \alpha^4
  • s3=r(α5)=α11s_3 = r(\alpha^5) = \alpha^{11}
  • s4=r(α7)=α8s_4 = r(\alpha^7) = \alpha^8
SyndromeValue
s1s_1α2\alpha^2
s2s_2α4\alpha^4
s3s_3α11\alpha^{11}
s4s_4α8\alpha^8
The PGZ method solves for the error-locator polynomial using the syndrome matrix for ν=2 errors, yielding σ(x)=α14x2+α2x+1\sigma(x) = \alpha^{14} x^2 + \alpha^2 x + 1 (note: the coefficients are consistent after scaling to make it monic in the field; the linear term is α^2, corresponding to the sum of inverse error locations). The Chien search tests roots at α^{-j} (j=1 to 15, adjusting for position indexing), finding zeros at α^{-4} and α^{-10} (positions 4 and 10). Error values y=1 for both. Correct by flipping bits 4 and 10, yielding c^(x)=x9+x6+x5+x4+x+1\hat{c}(x) = x^9 + x^6 + x^5 + x^4 + x + 1.

Decoding with Erasures

For cases with known erasure positions (e.g., unreadable symbols), binary BCH decoding modifies syndromes to account for erasures, treating them as with unknown values. In the errors-and-erasures variant, the modified vector incorporates erasure locator factors, solvable via PGZ-like methods up to t plus e erasures where 2t + e ≤ d-1. For example, in a BCH(15,7,5) code with one erasure at position 5 and one , compute adjusted excluding the erasure, then find the joint locator using Euclidean or Berlekamp-Massey on the modified key ; Forney values estimate the erasure symbol (0 or 1) and flip. This extends correction capability, e.g., one erasure plus one .

Applications and Comparisons

Practical Applications

BCH codes play a crucial role in digital communications systems, particularly in and deep- applications where reliable transmission over noisy channels is essential. In communications, they are integrated into standards such as those defined by the Consultative for Systems (CCSDS), where BCH coding is employed alongside other techniques like convolutional coding for and channel coding to mitigate errors in links. For deep-space probes, has historically utilized BCH codes to enhance error correction in missions requiring robust performance against high bit error rates, as demonstrated in soft-decision decoding implementations that outperform convolutional codes in certain scenarios. In wireless systems, BCH codes have been proposed in research for universal filtered multicarrier (UFMC) modulation as a candidate for systems to improve (BER) performance over (AWGN) channels. In , BCH codes are widely adopted for correction in optical and solid-state media. QR codes utilize BCH codes specifically for protecting format and version information against damage, allowing recovery of up to 7-18% rates depending on the code level, which complements Reed-Solomon codes for the main data payload. In , particularly NAND flash, BCH codes serve as the primary error-correcting mechanism for (MLC) and triple-level cell (TLC) storage, addressing multi-bit errors per cell through on-chip controllers that correct up to 40 bits per 1KB sector in high-density drives. Hardware implementations of BCH decoders are optimized for high-speed environments using application-specific integrated circuits (), enabling efficient parallel processing in resource-constrained systems. For instance, in optical communications, the binary BCH code with parameters (1023, 991, 13) is used in optical networks (OTN) to correct multiple symbol errors in high-bit-rate links, supporting with low overhead for 100 Gb/s and beyond. Post-2020 research has explored BCH codes in architectures, including spatially coupled product codes and generalized low-density parity-check (GLDPC) hybrids, to achieve ultra-reliable low-latency communication with enhanced BER under diverse channel conditions. Additionally, quantum error correction leverages BCH-based constructions, such as CSS-derived BCH codes, to handle erasure channels and partial error location knowledge in . Regarding performance, BCH codes efficiently correct up to 16-32 s in 1KB data blocks, balancing with correction capability in practical deployments like NAND ECC, where decoding latency remains suitable for real-time storage operations.

Comparisons with Other Codes

Bose-Chaudhuri-Hocquenghem (BCH) codes, particularly binary variants, serve as subfield subcodes of Reed-Solomon (RS) codes, where the binary alphabet restricts the RS code defined over GF(2^m) to its even-weight subcode, enabling efficient bit-level error correction. While RS codes achieve the maximum distance separable (MDS) bound with minimum distance d=nk+1d = n - k + 1, making them optimal for a given block nn and kk, BCH codes provide a designed distance δ\delta such that dδd \geq \delta, often achieving d=δd = \delta exactly for binary primitive codes, though they fall short of full MDS optimality. RS codes operate over larger symbol alphabets (e.g., GF(2^8) for bytes), excelling in burst error correction up to d1d-1, whereas BCH codes target random bit errors in binary channels, offering lower decoding and faster hardware implementation for short-to-medium block s. BCH codes generalize Hamming codes, which correspond to the single-error-correcting case (t=1t=1, δ=3\delta=3) of binary BCH codes with length n=2m1n = 2^m - 1. Hamming codes achieve the Hamming bound for single-error correction with parity-check bits m=log2(n+1)m = \log_2(n+1), providing perfect codes that detect and correct any single bit error, but they lack the multi-error capability of BCH codes, which support up to tt errors via extended syndrome computations. In terms of performance, BCH codes extend Hamming's structure for higher reliability in applications requiring multiple corrections, such as memory systems, while maintaining similar cyclic properties for straightforward encoding. However, Hamming codes are simpler and lower-latency for minimal error scenarios, often used as inner codes in hybrid schemes. Compared to low-density parity-check (LDPC) and Turbo codes, BCH codes offer algebraic decoding with fixed complexity independent of iterations, making them suitable for short block lengths where iterative methods like belief propagation in LDPC or log-MAP in Turbo become inefficient. LDPC and Turbo codes, being iterative, approach the Shannon limit asymptotically for long blocks, achieving lower bit error rates (e.g., near 10^{-5} at 0.5 dB above capacity) but at higher computational cost due to multiple decoding passes. BCH codes, while outperformed in high-rate long-block scenarios (e.g., BER of 10^{-3} at higher SNR thresholds), provide reliable correction for up to tt errors with lower latency, ideal for real-time binary applications.
Code TypeMinimum Distance FormulaDecoding ComplexityTypical Applications
BCHdδ=2t+1d \geq \delta = 2t + 1 (exact for binary primitive)Algebraic (O(t^2 n))Binary storage (e.g., NAND flash), short-block comm
Reed-Solomond=nk+1d = n - k + 1 (MDS)Berlekamp-Massey (O(n^2))Burst correction in CDs, deep space
Hammingd=3d = 3 lookup (O(1))Simple ECC in RAM, inner codes
LDPC/TurboVariable, near ShannonIterative (O(iter * n))Long-block wireless (, )
BCH codes are preferred for hardware-constrained binary channels due to their simple cyclic structure and efficient syndrome-based decoding, which avoids the iteration overhead of LDPC/Turbo codes while providing guaranteed correction for small tt.

References

Add your contribution
Related Hubs
User Avatar
No comments yet.