CRC Explained Simply and Clearly | Generated by AI

Home 2026.02

Question: How does Cyclic Redundancy Check (CRC) work?

Answer:

What is CRC?

A Cyclic Redundancy Check (CRC) is an error-detection technique used to determine whether data has been corrupted during transmission or storage. It works by treating data as a large binary number and performing a polynomial division — the remainder of that division becomes the checksum (also called the CRC value), which is appended to the data and verified at the receiving end.


Core Concept

The fundamental idea is:

  1. Both sender and receiver agree on a generator polynomial (the divisor).
  2. The sender computes a CRC remainder from the data and appends it.
  3. The receiver performs the same calculation. If the remainder is zero, the data is intact. If non-zero, an error occurred.

Step-by-Step Process

At the Sender Side:

  1. Choose a generator polynomial (e.g., x³ + x + 1, represented as binary 1011).
  2. Append zeros to the original data — the number of zeros equals the degree of the polynomial (i.e., if the polynomial is degree 3, append 3 zeros).
  3. Perform Modulo-2 division (binary XOR-based division) of the padded data by the generator polynomial.
  4. The remainder from this division is the CRC checksum.
  5. Replace the appended zeros with the CRC remainder and transmit the full frame (original data + CRC).

At the Receiver Side:

  1. Take the received data (including the CRC at the end).
  2. Divide it by the same generator polynomial using Modulo-2 division.
  3. If the remainder is 0 → data is error-free ✅
  4. If the remainder is non-zero → data is corrupted ❌ (request retransmission)

Example (Simplified)

Suppose:

Steps:

  1. Append 4 zeros: 11010110110000
  2. Perform XOR-based (Modulo-2) division by 10011
  3. Get remainder, e.g., 1110
  4. Transmit: 1101011011 + 1110 = 11010110111110

Receiver divides 11010110111110 by 10011. If remainder = 0000, data is valid.


Modulo-2 Division (XOR Division)

Unlike regular division, Modulo-2 division uses XOR instead of subtraction:

There are no borrows or carries — this makes it extremely fast and simple to implement in hardware.


Common CRC Standards

Standard Bit Length Common Use
CRC-8 8 bits Simple embedded systems
CRC-16 16 bits USB, Modbus, storage
CRC-32 32 bits Ethernet, ZIP, PNG, Wi-Fi
CRC-CCITT 16 bits Telecommunications

Higher bit-length CRCs are more robust but require more computation. CRC-32 can detect any single burst error up to 32 bits long and has a very low probability of missing longer errors.


What CRC Can and Cannot Do

CRC Can:

CRC Cannot:


Where CRC is Used


References:


Back Donate