Two-out-of-five code

Each word also had a sign flag, encoded using a two-out-of-three code, that could be A Alphanumeric, − Minus, or + Plus.

A variant is the United States Postal Service POSTNET barcode, used to represent the ZIP Code for automated mail sorting and routing equipment.

This method was also used in North American telephone multi-frequency and crossbar switching systems.

[3] The USPS Postal Alpha Numeric Encoding Technique (PLANET) uses the same weights, but with the opposite bar-height convention.

The following table represents decimal digits from 0 to 9 in various two-out-of-five code systems: The requirement that exactly two bits be set is strictly stronger than a parity check; like all constant-weight codes, a two-out-of-five code can detect not only any single-bit error, but any unidirectional error -- cases in which all the individual bit errors are of a single type (all 0→1 or all 1→0).

2 of 5 barcode (non-interleaved)
POSTNET barcode