ArticleslgStudy

science

BCD (character encoding)

BCD (character encoding) is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand BCD (character encoding) rather than just read about it. In short: BCD (binary-coded decimal), also called alphanumeric BCD, alphameric BCD, BCD Interchange Code, or BCDIC, 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.

Key takeaways

  • BCD (character encoding) belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect BCD (character encoding) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of BCD (character encoding) from memory before moving on to harder problems.

Reference excerpt

BCD (binary-coded decimal), also called alphanumeric BCD, alphameric BCD, BCD Interchange Code, or BCDIC, 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 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, 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. A letter has 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 a six-bit binary code by encoding the digit rows (nine rows, plus unpunched) into the low four bits, and the zone rows (three rows, plus unpunched) into the high two bits. The digit zero (a single punch in row 0) is usually handled specially in some way, and the digit code was extended to values 10 through 15 by combining a digit in the range 2–7 with a punch in row 8. 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, Bull, CDC, IBM, General Electric (the computer division was purchased by Honeywell in 1969), NCR, Siemens, and Sperry-UNIVAC. IBM announced the 8-bit Extended Binary Coded Decimal Interchange Code (EBCDIC), based on BCDIC, in 1964 with the introduction of its System/360 line.

Special characters The Recordmark or Record mark character (represented as ‡) is a character used to mark the end of a record. The BCD code for this character is 328 in some BCD variants. The closest Unicode equivalent is U+29E7 ⧧ THERMODYNAMIC, but that is not found in many fonts, so U+2021 ‡ DOUBLE DAGGER is often used instead. 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. The BCD code for this character is 778 in some BCD variants. The groupmark was proposed for Unicode standardization in 2015, and was assigned to value U+2BD2 ⯒ GROUP MARK. Functionally this corresponds to the EBCDIC IGS character (ASCII GS), X'1D'. It is now in Unicode 10.0 at this position, but only the Symbola and Unifont fonts support it. 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 many different versions of the six-bit BCD code. There are three major categories of difference:

The mapping from zone punches to high-order bits. All codes translate no zone punches to a bit pattern of 00, but some encode the zone punches in 12-11-0 order, preserving alphabetical order, while others use 0-11-12 order, resulting in a partially reversed alphabet. The handling of the digit 0. The straightforward translation from punched form would place the blank before digits 1–9, and encode 0 at the start of the line with 'S' in it. All codes have some special-case handling which either translates the digit 0 to the all-zero binary code (and moves the blank elsewhere), or gives it binary code 001010 (decimal 10) and moves the 8+2 punch elsewhere. The assignment of special characters. The characters assigned to codes beyond the basic alphanumeric set varied widely, even within one model of computer. For example, some computers had the percent and lozenge (U+2311 ⌑ SQUARE LOZENGE) at the same codes as left and right parentheses in other encodings. 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 hexadecimal (base-16) notation, as that most clearly reflects the structure of 4-bit binary coded decimal, plus two extra bits. For example, the code for 'A', in row 3x and column x1, is hexadecimal 31, or binary '11 0001'.

Tape style

48-character BCD code The first versions of BCDIC had 48 characters, as they were based on card punch patterns and the character sets of printers, neither of which encouraged having a power-of-two number of characters.

This was based on a 40-character punched card code; the original 37 (10 digits, 26 letters, and blank), plus three commercially important characters added around 1932: hyphen-minus used for printing credit balances and hyphenated names, the ampersand also used in many names and addresses (Procter & Gamble, Mr. & Mrs. Smith), and the asterisk used to overprint unused fields when printing cheques.

IBM 1401 BCD code Rather than following the IBM 704's storage representation, IBM 1401 followed the tape representation (descended from the 48-character BCD), thus using the all-zero code for blank and the code 10 (0x0A) for the digit zero. It had defined character forms for all possible values, for documentation purposes, but only 48 of the 63 non-blank characters were printable, and there was considerable variation in how the other code values (shaded in the table below) were depicted in practice. Even the other characters varied between different available print chains for the IBM 1403 printer.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with BCD (character encoding)

Start with the simplest possible case. Write down what BCD (character encoding) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to BCD (character encoding) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about BCD (character encoding) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of BCD (character encoding)

In research
BCD (character encoding) appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses BCD (character encoding) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
BCD (character encoding) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Character encoding, Character sets, EBCDIC code pages, so understanding it makes those chapters shorter.
In everyday life
Look for BCD (character encoding) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “BCD (character encoding)” →

How to study BCD (character encoding) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what BCD (character encoding) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain BCD (character encoding) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is BCD (character encoding) in simple terms?

BCD (binary-coded decimal), also called alphanumeric BCD, alphameric BCD, BCD Interchange Code, or BCDIC, 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…

Why does BCD (character encoding) matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study BCD (character encoding)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on BCD (character encoding).

Tags

  • Character encoding
  • Character sets
  • EBCDIC code pages

Keep exploring