Binary Coded Decimal
Binary Coded Decimal or BCD is a process of converting decimal numbers to binary equivalents. In this type of encoding, every digit in a decimal number is represented in the form of bits. It can be done in either 4-bit or 8-bit. BCD is a preferred system of converting decimal to binary as it treats each digit as a separate single sub-circuit.
The truth table for Binary Coded Decimal (BCD) is as follows:
Decimal | BCD |
0 | 0000 |
1 | 0001 |
2 | 0010 |
3 | 0011 |
4 | 0100 |
5 | 0101 |
6 | 0110 |
7 | 0111 |
8 | 1000 |
9 | 1001 |
In BCD, the decimal number is segregated into chunks of 4-bits for each decimal digit within the number. Every decimal is converted into its direct binary form.
For example:
Convert (123)10 in BCD
From the truth table above,
1=0001
2=0010
3=0011
Therefore, BCD becomes:
0001 0010 0011.
Reference