Communication Networks · Visualized
Hamming Code Correction
Error Control
Detecting and correcting corrupted bits with parity, CRC and Hamming codes.
3 interactive subtopics — each one animated, step-through and explained.
Hamming Code Correction
Error ControlHamming(7,4) weaves three parity bits among four data bits so that every possible single-bit flip produces a unique syndrome — a 3-bit number whose value is the position of the error. The receiver computes the syndrome, flips that one position back, and recovers the data with no retransmission.
How Hamming Code Correction Works
- Place data bits in positions 3,5,6,7; parity bits take positions 1,2,4.
- p1 checks positions 1,3,5,7; p2 checks 2,3,6,7; p4 checks 4,5,6,7 — even parity per group.
- Transmit the 7-bit codeword.
- Receiver recomputes all three group parities; the results form the syndrome s4 s2 s1.
- Syndrome 000 → clean. Otherwise syndrome (read as binary) names the exact flipped position — invert it.
Hamming Code Correction Worked Example
Try it: Enable “corrupt one bit”, replay — the syndrome points straight at the damaged cell and repairs it.
Data 1011 encodes to 0110011. Corrupt position 5 → syndrome computes to 101 = 5 → flip position 5 back. Two simultaneous flips would be miscorrected — Hamming guarantees only single-error correction.
Hamming Code Correction: Key Facts to Remember
Recommended resourcesAffiliate links · may earn us a commission
Recommended for learners
See how packets really travel
Networks are built on the structures and algorithms you can watch step by step — queues, trees, and routing algorithms.