Binary Coded Decimal (BCD) Representation
· Binary Coded Decimal represents each decimal digit using 4 binary bits.
· Decimal has 10 digits, namely 0 to 9; each of these digits is represented using 4 bits.
|
Column Headings |
23 |
22 |
21 |
20 |
|
8 |
4 |
2 |
1 | |
|
010 |
0 |
0 |
0 |
0 |
|
110 |
0 |
0 |
0 |
1 |
|
210 |
0 |
0 |
1 |
0 |
|
310 |
0 |
0 |
1 |
1 |
|
410 |
0 |
1 |
0 |
0 |
|
510 |
0 |
1 |
0 |
1 |
|
610 |
0 |
1 |
1 |
0 |
|
710 |
0 |
1 |
1 |
1 |
|
810 |
1 |
0 |
0 |
0 |
|
910 |
1 |
0 |
0 |
1 |
· You will also need to represent the sign before the number:
Negative (-) is 1010
Positive (+) is 1011
EXAMPLE 1
Represent -560 in BCD
|
Decimal number |
- |
5 |
6 |
0 |
|
BCD equivalent |
1011 |
0101 |
0110 |
0000 |
Therefore -56010 is 1011 0101 0110 00002
EXAMPLE 2
Represent 923 in BCD
|
Decimal number |
+ |
9 |
2 |
3 |
|
BCD equivalent |
1010 |
1001 |
0010 |
0011 |
Therefore 92310 is 1010 1001 0010 00112