Weight-two code[1] 

Description

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.

Realizations

Two-in-five, also known as the two-out-of-five code, was used in the United States Postal Service's POSTNET barcode system as well as the Postal Alpha-numeric Encoding Technique (PLANET).Two-in-five code forms the numerical part of the Code 39 barcode encoding.Two-in-five code was used on early IBM computers [2,3].

Notes

See Ref. [4] on weight-two codes.

Parents

Cousin

  • 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.

References

[1]
R. W. Hamming, Letter, April 5, 1978.
[2]
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) 222 (1959) DOI
[3]
T. Thompson, From Error-Correcting Codes Through Sphere Packings to Simple Groups (American Mathematical Society, 1983) DOI
[4]
A. E. Brouwer, "Two-weight Codes." Concise Encyclopedia of Coding Theory (Chapman and Hall/CRC, 2021) DOI
Page edit log

Your contribution is welcome!

on github.com (edit & pull request)— see instructions

edit on this site

Zoo Code ID: weight_two

Cite as:
“Weight-two code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2022. https://errorcorrectionzoo.org/c/weight_two
BibTeX:
@incollection{eczoo_weight_two, title={Weight-two code}, booktitle={The Error Correction Zoo}, year={2022}, editor={Albert, Victor V. and Faist, Philippe}, url={https://errorcorrectionzoo.org/c/weight_two} }
Share via:
Twitter | Mastodon |  | E-mail
Permanent link:
https://errorcorrectionzoo.org/c/weight_two

Cite as:

“Weight-two code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2022. https://errorcorrectionzoo.org/c/weight_two

Github: https://github.com/errorcorrectionzoo/eczoo_data/edit/main/codes/classical/bits/easy/weight_two.yml.