Communication Networks · Visualized

Parity Check

Error Control

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

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

Parity Check

Error Control

Parity is the simplest error detector: count the 1-bits of the data and append one extra bit so the total is even (even parity). The receiver recounts. If an odd number of bits flipped somewhere, the parity mismatches and the block is rejected — but two flips cancel out and slip straight through.

How Parity Check Works

  1. Sender XORs all data bits together to compute the parity bit.
  2. The codeword (data + parity) now contains an even number of 1s.
  3. The receiver XORs every received bit including parity.
  4. Result 0 → accept; result 1 → an odd number of errors occurred → discard / ask again.
  5. Any even number of bit-flips preserves parity and goes undetected.

Parity Check Worked Example

Try it: Toggle “flip one bit in transit” and replay — the verdict flips from OK to ERROR DETECTED.

Data 1011010 has four 1s → parity 0 keeps it even. Flip the third bit: three... five 1s? Recount says odd — rejected. This 12.5% overhead buys detection of every single-bit corruption.

SENDER computes parity1d10d21d31d40d51d60d7parity = XOR of all data bits
parity bit flipped in transit
Stage 1 / 5
Data 1011010 has 4 ones → parity bit 0 keeps the total even. (even parity)

Parity Check: Key Facts to Remember

Overhead1 bit per byte/block — minimal
Powerdetects all odd-count errors; misses even counts
Where usedserial links, memory ECC foundations, UART stop configurations

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.