Communication Networks · Visualized

CRC — Cyclic Redundancy Check

Error Control

Detecting and correcting corrupted bits with parity, CRC and Hamming codes.

3 interactive subtopics — each one animated, step-through and explained.

CRC — Cyclic Redundancy Check

Error Control

CRC treats the message as one huge binary number and divides it (mod-2 arithmetic, i.e. XOR) by a fixed generator polynomial. The remainder — typically 16 or 32 bits — is appended. Because division amplifies any changed bit, a correct receiver always computes remainder zero. Ethernet’s FCS field is a CRC-32.

How CRC — Cyclic Redundancy Check Works

  1. Append r zeros to the data, where r = degree of the generator (here 3 for 1101).
  2. Divide by the generator using XOR instead of subtraction — align leftmost 1s and XOR.
  3. The r-bit remainder replaces the appended zeros: this is the transmitted codeword.
  4. Receiver divides the whole received word by the same generator.
  5. Remainder 0 → accepted; anything else means corruption (or an uncorrectable pattern).

CRC — Cyclic Redundancy Check Worked Example

Try it: Play — the division walks column by column; the yellow register shows the live remainder.

Data 101001 with generator 1101 ends with remainder 001 → the wire carries 101001001. Re-dividing at the receiver yields 000: accepted. Flip any bit during transit and the remainder turns non-zero.

data 101001 ÷ mod-2 generator 1101101001000
division focus generator aligned CRC remainder bits
Stage 1 / 9
Generator 1101 has degree 3 → append three 0s to data 101001: dividend 101001000. Divide using XOR.

CRC — Cyclic Redundancy Check: Key Facts to Remember

Strengthcatches all single/double-bit errors, all odd-count errors, and bursts ≤ r
Overheadr extra bits regardless of message length — great for long frames
Standard generatorsCRC-32 (Ethernet, zip): 100000100110000010001110110110111

Recommended resourcesAffiliate links · may earn us a commission

Recommended for learners

Cloud hosting for side projectsShip the portfolio project that gets you hired — free credits for new accounts.Claim credits Pro code editor & AI assistantWrite, debug and explain code faster while you practice the patterns here.Try it free Structured coding coursesVideo courses that pair well with visual practice — pick one language and go deep.Browse courses

See how packets really travel

Networks are built on the structures and algorithms you can watch step by step — queues, trees, and routing algorithms.