Skip to main content

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

DecimalBCDDecimalBCD
0000050101
1000160110
2001070111
3001181000
4010091001

The six combinations 1010 to 1111 are invalid in BCD.

Examples

  • (259)10(259)_{10} = 0010 0101 1001 (BCD)
  • (47)10(47)_{10} = 0100 0111 (BCD), whereas in pure binary 47=101111247 = 101111_2.
  • BCD 1001 0011 = (93)10(93)_{10}.

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: 7+57 + 5

    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)

All Digital Logic chapter 1 questions →