Library
Back to reading

What Are Cyclic Redundancy Check Codes?

What Is a CRC?

A Cyclic Redundancy Check (CRC) is an error-detecting code used to determine whether digital data have been corrupted during transmission or storage. By adding a small number of check bits to each block of data, a CRC enables the receiver to detect accidental errors with extremely high reliability. Unlike forward error correction (FEC) codes, however, a CRC can detect errors but cannot correct them.

The basic principle is straightforward. Before transmission, the data block is treated as a binary polynomial and divided by a predetermined generator polynomial. The remainder from this division becomes the CRC value, which is appended to the transmitted data. At the receiving end, the same calculation is performed. If the newly calculated remainder matches the received CRC, the data are assumed to be correct. If the values differ, one or more transmission errors have occurred.

A useful analogy is adding a tamper-evident seal to a package. If the seal is intact when the package arrives, there is good reason to believe the contents have not been altered. If the seal is broken, the recipient immediately knows that something has gone wrong, although the seal itself cannot restore the damaged contents. A CRC performs the same function mathematically for digital data.

One of the principal advantages of CRCs is their excellent error-detection capability. Carefully chosen generator polynomials allow CRCs to detect all single-bit errors, all double-bit errors, all odd numbers of bit errors (for many CRCs), and virtually all burst errors shorter than the length of the CRC. Even for longer error patterns, the probability of an undetected error is extremely small.

CRCs are available in several common lengths, including CRC-8, CRC-16, CRC-32, and CRC-64, where the number indicates the length of the check value in bits. Longer CRCs provide greater protection against undetected errors but require slightly more transmission overhead.

CRCs are used throughout digital communications and computing. They protect Ethernet frames, storage devices, optical media, USB communications, satellite links, digital television, file formats, compressed archives, and numerous industrial communication protocols. In systems using Automatic Repeat reQuest (ARQ), a failed CRC causes the receiver to request retransmission of the corrupted data.

It is important to distinguish a CRC from an error-correcting code. A CRC determines whether an error has occurred but does not identify which bits are incorrect. Error-correcting codes such as Hamming Codes, BCH Codes, Reed–Solomon Codes, and Low-Density Parity-Check (LDPC) Codes add sufficient redundancy to locate and correct errors automatically. For this reason, CRCs are often used together with FEC codes to provide both reliable error detection and error correction.

Today, the CRC is one of the most widely used error-detection techniques in digital communications. Its combination of mathematical simplicity, low computational cost, and exceptional error-detection performance has made it a standard feature of communication networks, storage systems, and digital devices. Although it cannot repair corrupted data, its ability to detect errors quickly and reliably makes it an indispensable component of modern digital communication systems.

Back to reading