Binary Coded Decimal (BCD)

Binary-coded decimal, or BCD, uses binary digits to represent the decimal digits 0 through 9. A decimal (denary) digit is represented by four binary digits, as shown below:

BCD

Decimal

0000

=

0

0001

=

1

0010

=

2

0011

=

3

0100

=

4

0101

=

5

0110

=

6

0111

=

7

1000

=

8

1001

=

9



To convert a decimal number to BCD:
First, write out the decimal number to be converted; then, below each digit write the binary equivalent of that digit:


2

6

4

0010

0110

0100



So the BCD equivalent of 264 is 0010 0110 0100
To convert from BCD to decimal, simply reverse the process as shown:

1001

1000

0011

9

8

3



So the decimal equivalent of 1001 1000 0011 is 983