
Hamming Code
안내
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.
이 단계의 재료:
Graph Paper1 pad
Graphite Pencil Set1 세트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.
이 단계의 재료:
Cardstock Assorted Pack (50 Sheets)1 팩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.
재료
3- 1 pad플레이스홀더
- 플레이스홀더
CC0 퍼블릭 도메인
이 블루프린트는 CC0로 공개되었습니다. 어떤 목적으로든 자유롭게 복사, 수정, 배포 및 사용할 수 있습니다.
제품 구매를 통해 메이커를 지원하세요. 판매자가 설정한 메이커 커미션 을 받거나, 이 블루프린트의 새로운 반복을 만들어 연결로 포함시킬 수 있습니다.

