Bi-quinary coded decimal
| This article does not cite any references or sources. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. (December 2009) |
Bi-quinary coded decimal is a numeral encoding scheme used in many abacuses and in some early computers, including the Colossus. The term bi-quinary indicates that the code comprises both a two-state (bi) and a five-state (quinary) component. The encoding resembles that used by many abaci, with four beads indicating either 0..4 or 5..9 and another bead indicating which of those ranges.
Several human languages, most notably Khmer and Wolof, also use biquinary systems. For example, the Khmer word for 6, pram muoy, literally means five [plus] one.
[edit] Decoding
To decode the Biquinary code use the number 5043210.
At each digit multiply the biquinary number by the number 5043210. This will give you one decimal digit.
For example take the number 0110000. To change this into decimal:
-
- (5 × 0) + (0 × 1) + (4 × 1) + (3 × 0) + (2 × 0) + (1 × 0) + (0 × 0) = 4
[edit] Examples
Several different representations of bi-quinary coded decimal have been used by different machines. The two-state component is encoded as one or two bits, and the five-state component is encoded using three to five bits. Some examples are:
- IBM 650 – 7 bits (two ‘bi’ bits: 0 5 and five ‘quinary’ bits: 0 1 2 3 4) with error checking (exactly one ‘bi’ bit and one ‘quinary’ bit set in a valid digit); in the picture of the front panel below, the bi-quinary encoding of the internal workings of the machine are evident in the arrangement of the lights – the 'bi' bits form the top of a T for each digit, and the 'quinary' bits form the vertical stem (the machine was running when the photograph was taken and the active bits are just discernible)
| Value | 05-01234 Bits |
|
| 0 | 10-10000 | |
| 1 | 10-01000 | |
| 2 | 10-00100 | |
| 3 | 10-00010 | |
| 4 | 10-00001 | |
| 5 | 01-10000 | |
| 6 | 01-01000 | |
| 7 | 01-00100 | |
| 8 | 01-00010 | |
| 9 | 01-00001 |
- UNIVAC 60 and UNIVAC 120 – 5 bits (four ‘quinary’ bits: 1 3 5 7 and one ‘bi’ bit: 9)
| Value | 13579 bits |
| 0 | 00000 |
| 1 | 10000 |
| 2 | 10001 |
| 3 | 01000 |
| 4 | 01001 |
| 5 | 00100 |
| 6 | 00101 |
| 7 | 00010 |
| 8 | 00011 |
| 9 | 00001 |
- UNIVAC Solid State – 4 bits (one ‘bi’ bit: 5 and three binary coded ‘quinary’ bits: 4 2 1) with 1 parity check bit
| Value | p-5-421 bits |
| 0 | 1-0-000 |
| 1 | 0-0-001 |
| 2 | 0-0-010 |
| 3 | 1-0-011 |
| 4 | 0-0-100 |
| 5 | 0-1-000 |
| 6 | 1-1-001 |
| 7 | 1-1-010 |
| 8 | 0-1-011 |
| 9 | 1-1-100 |
- Univac LARC – 4 bits (one ‘bi’ bit: 5 and three ring counter coded ‘quinary’ bits) with 1 parity check bit
| Value | p-5-qqq bits |
| 0 | 1-0-000 |
| 1 | 0-0-001 |
| 2 | 1-0-011 |
| 3 | 0-0-111 |
| 4 | 1-0-110 |
| 5 | 0-1-000 |
| 6 | 1-1-001 |
| 7 | 0-1-011 |
| 8 | 1-1-111 |
| 9 | 0-1-110 |
