"Binary Coded Decimal", also called a packet decimal, is a method for representing decimal numbers (integers) where each digit is represented by 4 bits that are called a nibble.

Binary digits are represented by 0 and 1. 0 means "off" and 1 means "on". Each binary digit is called a bit. Four bits together are called a nibble and a nibble is used to represent each decimal digit (0 through 9). BCD has been in use since the first UNIVAC computer. The first binary number system was documented by Gottfried Leibniz in the 17th century. In 1854 mathematician George Boole came up with a system of logic that is known today as Boolean Algebra (based on two elements 0's and 1's).

The following is an example of decimal digits and how they are represented as binary decimal digits:

Decimal BCD
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
Using the above chart, you could write the number 874 as 1000 0111 0100 in BCD. The advantage that Binary Coded Decimal (BCD) has over Binary is that there is no limit to number size. For every decimal number added, you add 4-bits or one nibble. Binary numbers are limited to the largest number that can be represented by 8, 16, 32 and 64 bits. It is easier to convert decimal numbers to and from BCD than Binary. BCD is usually converted to Binary for arithmetic processing since computers only process 0's and 1's. However, hardware can be built to operate directly with BCD. BCD is common in electronic systems where numeric value is displayed. This is done in systems that consist of digital logic and do not contain a microprocessor.

Computer processing requires a minimum of 1 byte (8 bits) therefore, the left portion of each BCD number is wasted storage. Because storage is valuable, storage can be saved by using packed BCD numbers. With packed BCD numbers (e.g. 2 bytes are use to store 3484 instead of 4 bytes) the left byte will consist of 00110100 (34) the right byte will consist of 10000100 (84).

Other Related Definitions for BCD

"A number representation where a number is expressed as a sequence of decimal digits and then each decimal digit is encoded as a four-bit binary number (a {nibble}). E.g. decimal 92 would be encoded as the eight-bit sequence 1001 0010. In some cases, the right-most nibble contains the sign (positive or negative). It is easier to convert decimal numbers to and from BCD than binary and, though BCD is often converted to binary for arithmetic processing, it is possible to build {hardware} that operates directly on BCD. Do calculators use BCD?" [Provided By Denis Howe (2001-01-27)]

"Harsh Environments Not A Problem With Absolute Encoders... "The DSM936 absolute encoders can handle a variety of severe electrical and physical environments. They convert any shaft input to binary coded decimal (BCD) or binary information corresponding directly to the shaft angle with an accuracy of 1 point in 1000. Also, they consist of a 1.1-in. diameter transducer and pc-mounting module measuring 2.6 by 3.1 by 6 in. The zero point can... binary. Basic update rate is 2.5 ms. Power is 15 V dc at 25 mA and 5 V at 300 mA. " [Roger Allan Feb 16, 2004]

"Analog-To-Digital Converters... The digital value appears on the converter's output as a binary or binary coded decimal (BCD). The value is obtained by dividing the sampled analog input voltage." [ David G. Morrison Oct 13, 2003 ]

"Easily Convert Decimal Numbers To Their Binary And BCD Formats ... Here's a C/C++ program that converts decimal numbers ranging from 0 to 99,999 to binary and BCD formats. ... When decimal numbers are within the range of 0 to 9, their binary and BCD representations are identical, requiring only four bits (0000 to 1001). ... If we treat the BCD representation as a straight binary number and compare it to the actual binary representation of the decimal value, we note that there's a decimal difference of 6 between the two numbers. ... The actual decimal number varies between 10 and 19, ..." [Edmond Vinarub Oct 18, 2004]

"Why is BCD of interest? Isn't all data stored as binary floating-point? Well, actually, no, it's not. As fate would have it, more of the world's data is stored in BCD, or one of its more efficient cousins such as Chen-Ho encoding, than in any other form. Apart from anything else, this is because most financial data has to be represented this way by law. (Financial institutions often need to perform calculations involving tenths of dollars or tenths of cents, but the binary equivalent of 1/10, for example, is a repeating pattern of 1s and 0s that degrades accuracy over the course of multiple operations.)" [Clive (Max) Maxfield- September 7, 2005]

Can Birds-Eye.Net help you or your Company?
Receive your Birds-Eye.Net articles and white
papers hot off
the presses by adding our RSS feed to your reader.