Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M6091

Hamming Code

Hamming Code
SystemsHigh supportSystems Theory
Included
account_tree

Updated 2026-07-28

Loading revision record…

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.

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/2

Practice this model in one real situation:

Check to track your progress (stored locally)
Learning progress0%

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.

  • link
    zh.wikipedia.orghttps://zh.wikipedia.org/wiki/%E6%B1%89%E6%98%8E%E7%A0%81ZH · Explicit
    verified
account_treeGenealogyexpand_more

RELATED MODELS