Bi-quinary coded decimal

From HandWiki
Revision as of 23:37, 6 February 2024 by Scavis2 (talk | contribs) (change)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Short description: Numeral encoding scheme

Biquinary code example[1]
Reflected biquinary code
Japanese abacus. The right side represents 1,234,567,890 in bi-quinary: each column is one digit, with the lower beads representing "ones" and the upper beads "fives".

Bi-quinary coded decimal is a numeral encoding scheme used in many abacuses and in some early computers, including the Colossus.[2] 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 abacuses, with four beads indicating the five values either from 0 through 4 or from 5 through 9 and another bead indicating which of those ranges (which can alternatively be thought of as +5).

Several human languages, most notably Fula and Wolof also use biquinary systems. For example, the Fula word for 6, jowi e go'o, literally means five [plus] one. Roman numerals use a symbolic, rather than positional, bi-quinary base, even though Latin is completely decimal.

The Korean finger counting system Chisanbop uses a bi-quinary system, where each finger represents a one and a thumb represents a five, allowing one to count from 0 to 99 with two hands.

One advantage of one bi-quinary encoding scheme on digital computers is that it must have 2 bits set (one in the binary field and one in the quinary field), providing a built in checksum to verify if the number is valid or not. (Stuck bits happened frequently with computers using mechanical relays.)

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 – seven 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 is set in a valid digit. In the pictures of the front panel below and in close-up, 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 visible in the close-up and just discernible in the full panel picture)
Value 05-01234 bits[1]
IBM 650 front panel
Close-up of IBM 650 indicators
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
One quinary bit (tube) for each of 1, 3, 5, and 7 - only one of these would be on at the time.
The fifth bi bit represented 9 if none of the others were on; otherwise it added 1 to the value represented by the other quinary bit.
(sold in the two models UNIVAC 60 and UNIVAC 120)
Value 1357-9 bits
0 0000-0
1 1000-0
2 1000-1
3 0100-0
4 0100-1
5 0010-0
6 0010-1
7 0001-0
8 0001-1
9 0000-1
One bi bit: 5, three binary coded quinary bits: 4 2 1[4][5][6][7][8][9] and one 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
One bi bit: 5, three Johnson counter-coded quinary bits and one 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

See also

References

  1. 1.0 1.1 "Part 4. Logical Design of Digital-Computer Circuitry; Chapter 15. Serial Arithmetic Operations; Chapter 15-7. Additional Topics". Digital Computer and Control Engineering. McGraw-Hill Electrical and Electronic Engineering Series (1 ed.). New York, US: McGraw-Hill Book Company, Inc. (printer: The Maple Press Company, York, Pennsylvania, US). 1960. pp. 517–518. ISBN:978-0-07036981-8. ark:/13960/t72v3b312. ISBN 0-07036981-X. OCLC 1033638267. http://bitsavers.informatik.uni-stuttgart.de/pdf/columbiaUniv/Ledley_Digital_Computer_and_Control_Engineering_1960.pdf. Retrieved 2021-02-19. "[…] The use of the biquinary code in this respect is typical. The binary part (i.e., the most significant bit) and the quinary part (the other 4 bits) are first added separately; then the quinary carry is added to the binary part. If a binary carry is generated, this is propagated to the quinary part of the next decimal digit to the left. […]"  [1] (xxiv+835+1 pages)
  2. "Why Use Binary? - Computerphile". YouTube. 2015-12-04. https://www.youtube.com/watch?v=thrx3SBEpL8&list=WL&index=17&t=0s. 
  3. Mathematics and Computers (1 ed.). New York, US / Toronto, Canada / London, UK: McGraw-Hill Book Company, Inc.. 1957. p. 105.  (10+228 pages)
  4. Steinbuch, Karl W., ed (1962). "1.3.3. Die Codierung von Zahlen". written at Karlsruhe, Germany (in de). Taschenbuch der Nachrichtenverarbeitung (1 ed.). Berlin / Göttingen / New York: Springer-Verlag OHG. pp. 68–75. 
  5. (in de) Taschenbuch der Nachrichtenverarbeitung (2 ed.). Berlin, Germany: Springer-Verlag OHG. 1967. Title No. 1036. 
  6. (in de) Taschenbuch der Informatik - Band II - Struktur und Programmierung von EDV-Systemen. 2 (3 ed.). Berlin, Germany: Springer-Verlag. 1974. ISBN 3-540-06241-6. 
  7. Digital Electronics. Philips Technical Library (PTL) / Macmillan Education (Reprint of 1st English ed.). Eindhoven, Netherlands: The Macmillan Press Ltd. / N. V. Philips' Gloeilampenfabrieken. 1973-06-18. doi:10.1007/978-1-349-01417-0. ISBN 978-1-349-01419-4. https://books.google.com/books?id=hlRdDwAAQBAJ. Retrieved 2020-05-11. [yes|permanent dead link|dead link}}] (270 pages) (NB. This is based on a translation of volume I of the two-volume German edition.)
  8. (in de) Digitale Elektronik in der Meßtechnik und Datenverarbeitung: Theoretische Grundlagen und Schaltungstechnik. Philips Fachbücher. I (improved and extended 5th ed.). Hamburg, Germany: Deutsche Philips GmbH. 1975. p. 50. ISBN 3-87145-272-6.  (xii+327+3 pages) (NB. The German edition of volume I was published in 1969, 1971, two editions in 1972, and 1975. Volume II was published in 1970, 1972, 1973, and 1975.)
  9. 9.0 9.1 "Decimal Representations". quadibloc. 2018. http://www.quadibloc.com/comp/cp0203.htm. 

Further reading