BCD (character encoding)
BCD ("Binary-Coded Decimal"), also called alphanumeric BCD, alphameric BCD, BCD Interchange Code,[1] or BCDIC,[1] is a family of representations of numerals, uppercase Latin letters, and some special and control characters as six-bit character codes.
Unlike later encodings such as ASCII, BCD codes were not standardized. Different computer manufacturers, and even different product lines from the same manufacturer, often had their own variants, and sometimes included unique characters. Other six-bit encodings with completely different mappings, such as some FIELDATA[1] variants or Transcode, are sometimes incorrectly termed BCD.
Many variants of BCD encode the characters '0' through '9' as the corresponding binary values.
History
Technically, binary-coded decimal describes the encoding of decimal numbers where each decimal digit is represented by a fixed number of bits, usually four.
With the introduction of the IBM card in 1928, IBM created a code capable of representing alphanumeric information,[2] later adopted by other manufacturers. This code represents the numbers 0-9 by a single punch, and uses multiple punches for upper-case letters and special characters.[3] A letter had two punches (zone [12,11,0] + digit [1–9]); most special characters have two or three punches (zone [12,11,0,or none] + digit [2–7] + 8).
The BCD code is the adaptation of the punched card code to binary code by encoding the ten numeric rows of the card into four bits and using one bit each for the "eleven" and "twelve" rows.[4] IBM applied the terms binary-coded decimal and BCD to the variations of BCD alphamerics used in most early IBM computers, including the IBM 1620, IBM 1400 series, and non-Decimal Architecture members of the IBM 700/7000 series.
Among the vendors using BCD were Burroughs,[5] Bull, CDC,[6] IBM, General Electric (the computer division was purchased by Honeywell in 1969), NCR, Siemens, and Sperry-UNIVAC.
IBM later created the 8-bit Extended Binary Coded Decimal Interchange Code (EBCDIC) based on BCDIC.
Special characters
The Recordmark or Record mark character (represented as ‡) is a character used to mark the end of a record.[7] The BCD code for this character is 328 in some BCD variants. As of 2016 the recordmark has no assigned Unicode value. Functionally this corresponds to the EBCDIC IRS character (ASCII RS), X'1E'.
The Groupmark or Group mark character (represented as ) is a character used to indicate the start or finish of a group of related fields.[8] The BCD code for this character is 778 in some BCD variants. The groupmark was proposed for Unicode standardization in 2015,[9] and was assigned to value "#&2BD2" Functionally this corresponds to the EBCDIC IGS character (ASCII GS), X'1D'.
The Wordmark, by contrast, is not a BCD character. Rather, it is a flag bit used to mark the end of a word on some variable word length computers such as the IBM 1401.
BCD code variations
There are different versions of the six-bit BCD code. There are at least 4 versions with some different characters.
In "Spanish speaking countries", the character "Ñ" did not exist in the original system, therefore "@" was chosen by most manufacturers: Bull, NCR, and Control Data, but there was an inconsistency when merging databases to 7-bit ASCII code, for in that coding system the "/" character was chosen, resulting in two different codes for the same character.
Examples of BCD codes
The following charts show the numeric values of BCD characters in octal (base-8) notation. For example, the code for 'A", shown as '002001'B4 would be binary '01 0001'.
IBM 704 BCD code[10]
The following table shows the code assignments for the IBM 704 computer. Unassigned code positions appear as blanks.
000 | 001 | 002 | 003 | 004 | 005 | 006 | 007 | |
000 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
001 | 8 | 9 | = | - | ||||
002 | + | A | B | C | D | E | F | G |
003 | H | I | . | ) | ||||
004 | - | J | K | L | M | N | O | P |
005 | Q | R | $ | * | ||||
006 | space | / | S | T | U | V | W | X |
007 | Y | Z | , | ( | ||||
000 | 001 | 002 | 003 | 004 | 005 | 006 | 007 |
GBCD code
Below is the table of GE/Honeywell's GBCD code, a variant of BCD.[11]
000 | 001 | 002 | 003 | 004 | 005 | 006 | 007 | |
000 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
001 | 8 | 9 | [ | # | @ | : | > | ? |
002 | space | A | B | C | D | E | F | G |
003 | H | I | & | . | ] | ( | < | \ |
004 | ^ | J | K | L | M | N | O | P |
005 | Q | R | - | $ | * | ) | ; | ' |
006 | + | / | S | T | U | V | W | X |
007 | Y | Z | _ | , | % | = | " | ! |
000 | 001 | 002 | 003 | 004 | 005 | 006 | 007 |
Burroughs B5500 BCD code
The following table shows the code assignments for the Burroughs B5500 computer, sometimes referred to as BIC (Burroughs Interchange Code).[12]
000 | 001 | 002 | 003 | 004 | 005 | 006 | 007 | |
000 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
001 | 8 | 9 | # | @ | ? | : | > | ≥ |
002 | + | A | B | C | D | E | F | G |
003 | H | I | . | [ | & | ( | < | ← |
004 | × | J | K | L | M | N | O | P |
005 | Q | R | $ | * | - | ) | ; | ≤ |
006 | space | / | S | T | U | V | W | X |
007 | Y | Z | , | % | ≠ | = | ] | " |
000 | 001 | 002 | 003 | 004 | 005 | 006 | 007 |
See also
Notes and references
- 1 2 3 Mackenzie, Charles E. (1980). Coded Character Sets, History and Development. The Systems Programming Series (1 ed.). Addison-Wesley Publishing Company, Inc. ISBN 0-201-14460-3. LCCN 77-90165. ISBN 978-0-201-14460-4. Retrieved 2016-05-22.
- ↑ Pugh, Emerson W.; Heide, Lars. "STARS:Punched Card Equipment". IEEE Global History Network. Archived from the original on May 11, 2012. Retrieved June 9, 2012.
- ↑ Pugh, Emerson W. (1995). Building IBM: Shaping and Industry and Its Technology. MIT Press. pp. 50–51. ISBN 978-0-262-16147-3.
- ↑ Jones, Douglas W. "Punched Card Codes". Retrieved Jan 1, 2014.
- ↑ Burroughs Corporation (1964). Burroughs B5500 Information Processing Systems: Reference Manual (PDF).
- ↑ Control Data Corporation (1965). Codes/Control Data 6600 Computer System (PDF).
- ↑ "Record-mark". PC Magazine: Encyclopedia. Retrieved April 9, 2016.
- ↑ "group mark". Encyclopedia.com. Retrieved April 9, 2016.
- ↑ Shirriff, Ken. "Proposal for addition of Group Mark symbol" Check
|url=
value (help) (PDF). unicode.org. Retrieved April 9, 2016. - ↑ "Fortran Automatic Coding System for the IBM 704" (PDF). IBM. 15 October 1956. p. 49. Retrieved 15 September 2015.
- ↑ Section: Tables of characters in BULL computers
- ↑ Burroughs B 5500 Information Processing Systems Extended Algol Reference Manual (PDF). 1966. p. B-1.
Further reading
- Operating System - GCOS 8 Operating System - Programmer's Guide - Bull NovaScale 9000 Series Assembly Instructions - GCOS 8 (PDF). Bull S.A. CEDOC. November 2003. 67 A2 RJ78 REV00. Archived from the original (PDF) on 2015-02-12.
- Bonten, J. H. M. (2009-03-08) [2007]. "Data formats in old 48- and 36-bits computers: Six-bits characters". Archived from the original on 2016-06-16. Retrieved 2016-06-16.