
Hamming Code
Ìlànà
Place the parity bits at the powers of two
Place the parity bits at the powers of two
Positions 1, 2, 4 and 8 are reserved; everything else carries data.
- Number seven positions 1 to 7.
- Mark positions 1, 2 and 4 as parity; 3, 5, 6 and 7 hold four data bits.
- Write your four data bits into their positions.
Materials for this step:
Graph Paper1 pad
Graphite Pencil Set1 ìtòWork out which bits each check covers
Work out which bits each check covers
Each parity bit covers every position whose number contains its bit.
- P1 covers positions 1, 3, 5, 7 — those with a 1 in the ones place.
- P2 covers 2, 3, 6, 7 — a 1 in the twos place.
- P4 covers 4, 5, 6, 7 — a 1 in the fours place.
- Set each parity bit to make its own group even.
Materials for this step:
Cardstock Assorted Pack (50 Sheets)1 àkópọ̀Corrupt a bit and locate it
Corrupt a bit and locate it
The correction, performed by arithmetic rather than by searching.
- Hand your seven-bit block to someone; have them flip one bit secretly.
- Check each parity group and write 1 for a failed group, 0 for a passed one.
- Read those results as a binary number: P4 P2 P1.
- That number is the position of the broken bit. Flip it back.
Measure the cost and find the boundary
Measure the cost and find the boundary
Every code pays for its capability, and every code has a limit.
- Count the overhead here: 3 parity bits for 4 data bits.
- Work out the overhead for 11 data bits — it needs only 4 parity bits.
- Now flip TWO bits and run the location procedure.
History and context
History and context
Richard Hamming published the code in 1950, having worked it out at Bell Labs where he had access to a relay computer only at weekends. His account of the motivation is refreshingly plain: the machine could tell something had gone wrong and then simply stopped, wasting the whole run, and he thought it should be able to do better.
What it added to the parity approach: a single parity bit detects one error and locates nothing. The two-dimensional grid in the parity blueprint locates an error but costs one bit per row and per column. Hamming's overlapping groups locate it with logarithmically few bits — for 11 data bits you need 4 parity bits where a grid would need far more. Same goal, three different costs, and the right choice depends on how much overhead the channel can afford.
Where it is used: ECC memory in servers uses a Hamming-derived code to correct single-bit errors caused by cosmic rays and electrical noise, silently, millions of times a day. Hamming distance — the number of positions in which two codewords differ — became a fundamental concept in coding theory and in fields far outside it, including genetics and machine learning.
Its neighbours in the space: Reed-Solomon handles bursts of adjacent errors and is what makes a scratched CD or an obscured QR code readable; convolutional and turbo codes suit continuous noisy streams like deep-space links; a simple retransmission request is often cheaper than any of them when the channel is bidirectional and cheap. Hamming's region is where errors are isolated, retransmission is impossible or expensive, and overhead must stay small.
Àwọn ohun-èlò
3- 1 padPlaceholder
- 1 ìtòPlaceholder
- Placeholder
Blueprint tó jọra
Àwọn blueprint wọ̀nyí pín ìmọ̀ — ọ̀nà, ohun-èlò tàbí ìlànà
CC0 Àgbègbè Gbogbogbò
Blueprint yìí ti jáde lábẹ́ CC0. O lè ṣe àdàkọ, yí padà, pín, àti lò láìsí ìyọ̀ǹda.
Ṣàtìlẹ́yìn Olùṣẹ́dá nípa rírà àwọn ọjà nipasẹ̀ Blueprint wọn Ẹ̀san Olùṣẹ́dá tí àwọn Olùtajà gbé kalẹ̀, tàbí ṣẹ̀dá àtúnṣe tuntun ti Blueprint yìí kí o sì fi sínú Blueprint rẹ gẹ́gẹ́ bí ìsopọ̀ láti pín owó-wíwọlé.

