- Asked 2/22
- 2078 Bhadra · 1.5 marks
- 2075 Asoj · 5 marks
BCD code with examples
Short answer
BCD represents each decimal digit with its 4-bit binary equivalent (8421 weights). Example: 47 decimal is 0100 0111 BCD. Only 0000–1001 are valid. BCD addition adds 0110 when a sum exceeds 9; used in displays and calculators.
Explain BCD code with suitable examples.
BCD (Binary Coded Decimal) is a code in which each decimal digit (0–9) is represented separately by its 4-bit binary equivalent. It is also called the 8421 code, since the four bits have weights 8, 4, 2 and 1.
BCD table
| Decimal | BCD | Decimal | BCD |
|---|---|---|---|
| 0 | 0000 | 5 | 0101 |
| 1 | 0001 | 6 | 0110 |
| 2 | 0010 | 7 | 0111 |
| 3 | 0011 | 8 | 1000 |
| 4 | 0100 | 9 | 1001 |
The six combinations 1010 to 1111 are invalid in BCD.
Examples
- = 0010 0101 1001 (BCD)
- = 0100 0111 (BCD), whereas in pure binary .
- BCD 1001 0011 = .
BCD addition
Add the digits in binary. If the 4-bit sum is greater than 1001 (9) or a carry is produced, add 0110 (6) to correct it.
Example:
0111 (7)
+ 0101 (5)
------
1100 invalid (>9)
+ 0110 add 6
------
1 0010 -> 0001 0010 = 12
Advantages
- Easy conversion between decimal and BCD; ideal for displays (7-segment), calculators, digital clocks and meters.
- Decimal fractions such as 0.1 are exact.
Disadvantages
- Needs more bits than pure binary (e.g. 99 needs 8 bits in BCD, 7 in binary), so storage is wasted.
- Arithmetic is more complex because of correction steps.
- Six of the 16 combinations are unused.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- BCD code and 3-bit binary-to-Gray converter · Digital Logic, chapter 1
- BCD code advantages and disadvantages · Digital Logic, chapter 1
- (1110)gray→BCD and (1430)₁₀→Excess-3 · Digital Logic, chapter 1
- Code conversions: (41.8125)₁₀, (1000)₂, (19)₁₀ · Digital Logic, chapter 1
- BCD counter 0-9999 on seven segment VHDL · Embedded System, chapter 9
- Importance of source coding; Shannon-Fano vs BCD (four symbols) · Communication Systems, chapter 6