A length-\(n\) binary code whose codewords all have Hamming weight two. Such codes provide slightly extra redundancy for storage of small-scale information such as ZIP codes or decimal digits.
For example, the two-in-five code has a size 10, thereby providing an encoding for the decimal digits 0 through 9. Such a code detects some single bit-flips as well as unidirectional errors using the fact that each codeword is weight-two. The code fails for any sequence of flips that maintains the constant weight.
- Two-weight code — Codewords of two-weight codes have one of two possible Hamming weights, while those of weight-two codes have Hamming weight two.
- R. W. Hamming, Letter, April 5, 1978.
- J. Svigals, “IBM 7070 data processing system”, Papers presented at the the March 3-5, 1959, western joint computer conference on XX - IRE-AIEE-ACM ’59 (Western) (1959) DOI
- T. M. Thompson, From Error-Correcting Codes Through Sphere Packings To Simple Groups, Mathematical Association of America, 1983.
- A. E. Brouwer, "Two-weight Codes." Concise Encyclopedia of Coding Theory (Chapman and Hall/CRC, 2021) DOI
Page edit log
- Victor V. Albert (2022-08-12) — most recent
“Weight-two code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2022. https://errorcorrectionzoo.org/c/weight_two