Error-correcting codes · after R. W. Hamming, Bell System Technical Journal, April 1950
Hamming — the letterform that heals itself
† struck in transit — located and corrected on arrival
Seven bits carry four. Three parity checks stand guard over every letter. When noise flips a bit — and it always does — the failing checks, read as a binary number, spell out the exact address of the wound. The letterform heals itself.
The living message
Each glyph travels as a Hamming(7,4) codeword — four data bits naming the letter, three parity bits standing guard at positions 1, 2 and 4. Noise strikes on its own schedule; click any bit cell to strike one yourself. Strike a second bit in the same codeword before it is serviced and watch the syndrome lie.
How the code finds the wound
Number the seven bits 1 through 7. Put parity at the powers of two — positions 1, 2, 4 — and data everywhere else. Each parity bit watches exactly the positions whose binary address contains its own: C1 sums bits 1·3·5·7, C2 sums 2·3·6·7, C4 sums 4·5·6·7. A clean codeword passes all three checks.
Flip any single bit and a unique combination of checks fails. Flip bit 5: C1 and C4 fail, C2 passes — syndrome 101, which is binary for five. The arithmetic does not search for the error. It computes its address.
Strike twice in one codeword and the syndrome lies. It points at a third, innocent bit, and the machine confidently corrects its way to the wrong letter — a clean, valid, incorrect codeword. Minimum distance three buys you one correction or two detections, never both at once. Hamming knew: his extended (8,4) code spends one more parity bit on the whole word to catch the double and call for retransmission. When a double fault lands here, the exhibit owns the miscorrection, stamps it, and retransmits.
The message codebook
Four data bits address sixteen symbols; this message needs thirteen, so three slots print as garble if a double fault ever decodes into them. Rest the cursor on a row to see every codeword in the stream that carries it.
The arithmetic of redundancy
Two lost weekends, 1947
Richard W. Hamming ran his problems on Bell Labs’ relay computers over the weekend, unattended. The machines already checked parity — they could see an error — but a single failed bit made them dump the whole job and move to the next one. Two consecutive Mondays of discarded work provoked the right question: if the machine can detect an error, why can’t it find the position and put the bit back?
The answer ran as “Error Detecting and Error Correcting Codes,” Bell System Technical Journal 29, April 1950 — fourteen pages that put redundancy to work as armour instead of alarm. The scheme above is its first construction, and it has never stopped shipping: ECC memory scrubs single flips with Hamming-class codes today, and every deep-space packet since has carried its descendants.