X · Coding theory
Hamming codes
What it is
Add log(n) parity bits to n data bits to detect 2 errors and correct 1. The original 1950 code; first single-error-correcting scheme.
Where it lives
ECC RAM (corrects the bit flips that DRAM gets from cosmic rays), early modems, every CD player.
The key insight
A (7,4) Hamming code adds 3 parity bits to 4 data bits. The Hamming distance — bits that differ between two codewords — must be at least 3 for single-error correction.