Hamming Code
Updated 2026-07-28
Summary
In the field of telecommunications, the Hamming code, also known as the Hamming code, is a linear error-correcting code derived from the (7,4) Hamming code, invented by Richard Wesley Hamming in 1950. In contrast, simple parity check codes can only detect an odd number of errors and cannot correct them. The Hamming code is a perfect code, achieving the highest code rate among codes with the same block length and a minimum distance of 3. In mathematical terms, the Hamming code is a binary linear code.
Definition
In the field of telecommunications, the Hamming code, also known as the Hamming code, is a linear error-correcting code derived from the (7,4) Hamming code, invented by Richard Wesley Hamming in 1950. In contrast, simple parity check codes can only detect an odd number of errors and cannot correct them. The Hamming code is a perfect code, achieving the highest code rate among codes with the same block length and a minimum distance of 3. In mathematical terms, the Hamming code is a binary linear code. For all integers r ≥ 2, there exists a code with block length n = 2^r − 1 and k = 2^r − r − 1. Therefore, the code rate of the Hamming code is R = k / n = 1 − r / (2^r − 1), which is the highest for codes with minimum distance 3 and block length 2^r − 1. The parity check matrix of the Hamming code is constructed by listing all non-zero column vectors of length r.
Introduction
How to use
In the field of telecommunications, the Hamming code, also known as the Hamming code, is a linear error-correcting code derived from the (7,4) Hamming code, invented by Richard Wesley Hamming in 1950. In contrast, simple parity check codes can only detect an odd number of errors and cannot correct them. The Hamming code is a perfect code, achieving the highest code rate among codes with the same block length and a minimum distance of 3. In mathematical terms, the Hamming code is a binary linear code.
Mechanism
Reserve check bits at positions that are powers of 2 among the 2^k positions; each check bit covers a specific set of data bits. Through parity check values, the erroneous bit can be located and flipped to correct. Use a small amount of redundancy to achieve self-correction capability for single-bit errors.
Practice
In progress 0/2Practice this model in one real situation:
Cases
- Richard Hamming designed it in 1950 at Bell Labs for telephone relays; modern RAM ECC memory, deep-space communication error correction; code review as a 'human Hamming code' to catch errors.
Common pitfalls
- Thinking that more redundancy is always better (cost and bandwidth trade-off); or mistakenly believing it can correct any number of errors (standard Hamming code only corrects single-bit errors).
Sources
Source support: Explicit
References currently contain only Wikipedia links; primary sources still need review.
- zh.wikipedia.orghttps://zh.wikipedia.org/wiki/%E6%B1%89%E6%98%8E%E7%A0%81verified
account_treeGenealogyexpand_more
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS