BCD

Updated: 03/05/2023 by Computer Hope

BCD may refer to any of the following:

binary coded decimal

1. Short for binary-coded decimal, BCD (also known as packet decimal) is numbers 0 through 9 converted to four-digit binary. BCD was used in some early decimal computers and the IBM System/360 series systems.

How to convert decimal to BCD

If the number is more than one digit, split it into separate numbers. For example, the number "25" would become "2" and "5." Once split, take each number and convert it to its BCD value (4-digit binary).

Below lists the decimal numbers 0 through 9 and the binary conversion values.

Tip

If you don't fully understand how to count to 9 in binary, see our binary page.

Decimal BCD
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001

Using this conversion, the number 25, for example, has a BCD number of 0010 (2 in binary) and 0101 (5 in binary) or 00100101. However, if 25 was stored as an 8-bit binary (not BCD), it's represented as 00011001, which requires an understanding of the first five digits in binary (16, 8, 4, 2, and 1).

As another example, if you were to convert a larger number like "953" into BCD, you'd follow the same steps below.

  1. Break "953" into three separate numbers (9, 5, and 3).
  2. Convert "9" into its 4-digit binary value (1001).
  3. Convert "5" into its 4-digit binary value (0101).
  4. Convert "3" into its 4-digit binary value (0011).
  5. Discover that the decimal "953" equals "1001 0101 0011" in BCD.

How to convert BCD to decimal

To convert BCD (binary coded decimal) to decimal requires converting the 4-digit BCD binary values into their decimal equivalent. You can do this by understanding how to count to 9 in binary or with the chart shown above. For example, if the BCD value were "0001 1001 0000" or "000110010000" with no spaces, convert each 4-digit to a decimal, which becomes "190" in decimal.

Why is BCD used?

For storing numbers, it's easier to convert decimal numbers to BCD than binary. For example, once you understand counting to 9 in binary, you can convert any number regardless of its size. However, with binary, it's more complex to convert large numbers because there are eight or more digit places instead of only four.

2. With Microsoft Windows, BCD is short for Boot Configuration Data and is a database containing boot-time configuration data. BCD was introduced with Windows Vista and replaced the boot.ini used with NTLDR (NT loader).

Base, Binary, Computer abbreviations, Decimal, EBCDIC, TLA