Two-out-of-five code

Two-out-of-five code

In telecommunication, a two-out-of-five code is an m of n code that provides exactly ten possible combinations, and thus is popular for representing decimal digits using five binary bits. There are ways to assign weights to each bit such that the set bits sum to the desired value, with an exception for zero.

According to Federal Standard 1037C:
# each decimal digit is represented by a binary numeral consisting of five bits of which two are of one kind, called "ones," and three are of the other kind, called "zeros", and
# the usual weights assigned to the bit positions are 0-1-2-3-6. However, in this scheme, zero is encoded as "binary" 01100; strictly speaking the 0-1-2-3-6 previously claimed is just a mnemonic device.

The weights give a unique encoding for most digits, but allow two encodings for 3: 0+3 or 10010 and 1+2 or 01100. The former is used to encode the digit 3, and the latter is used to represent the otherwise unrepresentable zero.

The IBM 7070, IBM 7072, and IBM 7074 computers used this code to represent each of the ten decimal digits in a machine word, although they numbered the bit positions 0-1-2-3-4, rather than with weights. Each word also had a sign flag, encoded using a two-out-of-three code, that could be A Alphanumeric, Minus, or + Plus. When copied to a digit, the three bits were placed in bit positions 0-3-4.

A variant is the U.S. Post Office POSTNET barcode, used to represent the ZIP+4 code for automated mail sorting and routing equipment. This uses two tall bars as "ones" and three short bars as "zeros". Here, the weights assigned to the bit positions are 7-4-2-1-0. Again, zero is encoded specially, using the 7+4 combination (binary 11000) that would naturally encode 11. This method was also used in North American telephone Multi-frequency and crossbar switching systems. [http://simplethinking.com/photo/phone/vintage/xbr%20relays.shtml]

The following table represents decimal digits from 0 to 9 in various two-out-of-five code systems:


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Hamming code — In telecommunication, a Hamming code is a linear error correcting code named after its inventor, Richard Hamming. Hamming codes can detect and correct single bit errors. In other words, the Hamming distance between the transmitted and received… …   Wikipedia

  • Number Five Crossbar Switching System — The Number Five Crossbar Switching System or 5XB switch, designed by Bell Labs and made by Western Electric, was in use in Bell System telephone exchanges from 1948 to the 1980s. Its principal use was as a Class 5 telephone switch, though… …   Wikipedia

  • Two Harbors, Minnesota — Infobox Settlement official name = Two Harbors, Minnesota settlement type = City nickname = motto = imagesize = 250px image caption = Aerial view of Two Harbors image image mapsize = 250px map caption = Location of Two Harbors, Minnesota mapsize1 …   Wikipedia

  • Two-factor authentication — (TFA, T FA or 2FA) is an approach to authentication which requires the presentation of two different kinds of evidence that someone is who they say they are. It is a part of the broader family of multi factor authentication, which is a defense in …   Wikipedia

  • Code Geass — Code Geass: Lelouch of the Rebellion First Code Geass DVD volume released in Japan. コードギアス 反逆のルルーシュ (Kōdo Giasu: Hangyaku no Rurūshu) …   Wikipedia

  • Code of Vengeance — Title card for the 1985 TV movie Also known as Dalton and Dalton s Code of Vengeance Genre …   Wikipedia

  • Five-pin bowling — is a bowling variant which is only played in Canada, where most bowling alleys offer it, either alone or in combination with ten pin bowling. It was devised around 1909 by Thomas F. Ryan in Toronto, Ontario, at his Toronto Bowling Club , in… …   Wikipedia

  • Code Lyoko — Format Animated, Science fiction, Action, Comedy Created by Tania Palumbo Thomas Romain …   Wikipedia

  • Code of the Clans —   …   Wikipedia

  • Code of Ur-Nammu — Ur Nammu (seated) bestows governorship on Ḫašḫamer, ensi of Iškun Sin (cylinder seal impression, ca. 2100 BC) …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”