Compute the Hamming parity bits r from data bits m using 2^r >= m + r + 1 for single-bit error correction.
汉明码可检测并纠正单比特错误。
| Item | Formula / Rule | Source / Standard |
|---|---|---|
| Parity bit count | Requires 2k ≥ m + k + 1 with m data bits and k parity bits | Hamming, Error Detecting and Error Correcting Codes, 1950 |
| Correction capability | With distance d = 3 the code corrects t = ⌊(d − 1)/2⌋ = 1 bit and detects 2 | Hamming 1950 §3 Single-error-correcting code |
| Codeword length | n = m + k, with parity bits placed at power-of-two positions 1, 2, 4, 8, … | ISO/IEC 2382 Information technology vocabulary |