Why Do CRCs Detect Burst Errors in Networks and Storage?
Cyclic Redundancy Checks are widely used in classical computing to detect accidental data corruption in network frames and storage sectors. They are particularly effective at catching burst errors, which are contiguous sequences of corrupted bits caused by physical disturbances like electrical interference or media defects. By treating bitstreams as polynomials over a finite field and performing modulo-2 division, a CRC guarantees the detection of any burst error up to the bit-length of the checksum itself.
Polynomial Representation Over GF(2)
In classical computing, a binary message of \(n\) bits can be represented as a polynomial \(M(x)\) of degree \(n - 1\) over the Galois Field \(GF(2)\), where each coefficient is either \(0\) or \(1\). Addition and subtraction in \(GF(2)\) are identical and correspond to the bitwise XOR operation, meaning there are no carries or borrows.
To compute a CRC of \(r\) bits, the sender and receiver agree on a generator polynomial \(G(x)\) of degree \(r\), which has \(r + 1\) bits. The sender appends \(r\) zero bits to the message, equivalent to computing \(x^r M(x)\), and divides it by \(G(x)\) using modulo-2 polynomial division. The remainder \(R(x)\), which has degree at most \(r - 1\), is the CRC value. The transmitted frame \(T(x)\) is formed by appending \(R(x)\) to the original message:
\[T(x) = x^r M(x) + R(x)\]
Because \(R(x)\) is the remainder of \(x^r M(x)\) divided by \(G(x)\), and addition is the same as subtraction in \(GF(2)\), the transmitted polynomial \(T(x)\) is an exact multiple of \(G(x)\).
How Burst Errors Are Modeled
When data travels over a network link or is read from a storage sector, noise rarely flips isolated single bits. Instead, physical phenomena such as electromagnetic interference, signal fading, or scratches on a disk surface tend to corrupt multiple adjacent bits. A burst error of length \(b\) is defined as a sequence of \(b\) bits where the first and last bits are corrupted, and any number of bits in between may also be flipped.
Mathematically, the received frame \(T'(x)\) can be expressed as the sum of the transmitted frame and an error polynomial \(E(x)\):
\[T'(x) = T(x) + E(x)\]
For a burst error of length \(b\) starting at bit position \(i\), the error polynomial takes the form:
\[E(x) = x^i B(x)\]
Here, \(B(x)\) is a polynomial of degree \(b - 1\) with a nonzero constant term (representing the first corrupted bit) and a nonzero \(x^{b-1}\) term (representing the last corrupted bit).
Why Burst Errors Cannot Escape Detection
Upon receiving \(T'(x)\), the receiver divides it by the same generator polynomial \(G(x)\). Since \(T(x)\) is divisible by \(G(x)\), the remainder of \(T'(x) / G(x)\) is simply the remainder of \(E(x) / G(x)\). An error goes undetected if and only if \(E(x)\) is evenly divisible by \(G(x)\).
For a burst error \(E(x) = x^i B(x)\) to be divisible by \(G(x)\), \(G(x)\) must divide \(x^i B(x)\). In standard CRC designs, the generator polynomial \(G(x)\) is chosen so that its constant term is \(1\) (meaning \(x\) does not divide \(G(x)\)). Because \(G(x)\) and \(x^i\) share no common factors, \(G(x)\) can only divide \(x^i B(x)\) if \(G(x)\) divides \(B(x)\).
If the burst length \(b\) is less than or equal to \(r\) (the degree of \(G(x)\)), then the degree of \(B(x)\) is \(b - 1 < r\). A nonzero polynomial of degree strictly less than \(r\) cannot be divisible by a polynomial of degree \(r\). Therefore, any burst error of length \(b \le r\) is guaranteed to leave a nonzero remainder and will always be detected.
Detection Beyond the Checksum Length
Even when a burst error is longer than the CRC (\(b > r\)), CRCs remain highly effective. For a burst of length \(b = r + 1\), \(B(x)\) has degree \(r\), which means it is divisible by \(G(x)\) only if \(B(x) = G(x)\). Assuming all bit error patterns of length \(r + 1\) are equally likely, the probability of \(B(x)\) matching \(G(x)\) exactly is \(2^{-(r-1)}\).
For any burst error of length \(b > r + 1\), the probability that \(B(x)\) is a multiple of \(G(x)\) approaches \(2^{-r}\). For a standard 32-bit CRC like CRC-32 used in Ethernet frames and storage systems, this means that even catastrophic bursts longer than 32 bits are detected with a probability of \(1 - 2^{-32}\), or over \(99.9999999\%\).
Practical Alignment With Hardware
Beyond their mathematical guarantees, CRCs are well suited to classical digital hardware. Modulo-2 polynomial division can be implemented using a simple Linear Feedback Shift Register (LFSR) with XOR gates, requiring minimal silicon area and operating at line speed. Lookup-table optimizations also allow software implementations to process bytes or words in parallel, making CRCs fast enough for high-throughput network interfaces and storage controllers.