Field Guide · algorithm

Also known as: BCH code

BCH codes (Bose–Chaudhuri–Hocquenghem) are a class of cyclic block error-correction codes that can be constructed to correct a chosen number of bit errors.1 Their defining feature is designed distance: the code builder picks how many errors t must be correctable, and the algebra then dictates how many parity bits are required — a flexibility that makes BCH a common choice for paging and signalling formats.

message bits (k) parity (n−k) e.g. BCH(31,21) in POCSAG
BCH codes append algebraically-computed parity bits that correct multiple bit errors per codeword.

How it works

A BCH code is cyclic, meaning any cyclic shift of a codeword is also a codeword; this lets both encoding and syndrome computation be done with simple shift-register polynomial arithmetic, the same machinery behind the CRC. The code is defined over the Galois field GF(2^m): to build a t-error-correcting code you form a generator polynomial whose roots include 2t consecutive powers of a primitive element, so every valid codeword is divisible by it. On reception the decoder evaluates the received polynomial at those roots to produce syndromes; if they are all zero the word is clean, and otherwise it solves for an error-locator polynomial — typically with the Berlekamp–Massey algorithm — whose roots reveal which bit positions to flip. Because BCH is binary, once the positions are known the values are simply inverted, so no separate error-magnitude step is needed.

Variants

The binary Hamming codes are the special single-error-correcting case of BCH. Extending the same construction from bits to multi-bit symbols yields the Reed–Solomon codes, which are exactly the non-binary BCH codes and share the identical syndrome/locator decoding path — Reed–Solomon just adds a Forney error-value stage because its symbols carry magnitude as well as position. Between these extremes, primitive and shortened BCH codes give designers a fine-grained way to trade parity overhead for correction strength.

Relevance to SDR

BCH coding protects the short, critical words in several signalling formats GopherTrunk meets: POCSAG paging uses a BCH(31,21) code on each codeword, DSC marine calling uses a small BCH code, and FLEX paging layers BCH with interleaving. Recovering these words even when a few bits are corrupted is what lets the decoder read paging and control traffic reliably on a weak signal.

Sources

  1. BCH code — Wikipedia, for the cyclic code family, Galois-field construction, and designed error-correction capability. See also Cyclic code for the shift-register polynomial structure. 

See also