---
title: "BCD code with examples"
subject: "Digital Logic"
chapter: 1
key: "semester_3/digital_logic:bcd-code-explain"
source: https://www.bctengineer.com/q/semester_3/digital_logic/bcd-code-explain
site: BCT Engineering
---

# BCD code with examples

Digital Logic · Chapter 1: Introduction

- Asked in: 2078 Bhadra, 1.5 marks; 2075 Asoj, 5 marks (asked 2 times)
- Video: [BCD Codes (Binary Coded Decimal Codes) Explained](https://www.youtube.com/watch?v=8sEUY-PBfaM) — ALL ABOUT ELECTRONICS
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_3/digital_logic/bcd-code-explain
- Whole chapter: https://www.bctengineer.com/md/semester_3/digital_logic/chapter-1

## Question

Explain BCD code with suitable 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.

## Answer

**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
- $(259)_{10}$ = 0010 0101 1001 (BCD)
- $(47)_{10}$ = 0100 0111 (BCD), whereas in pure binary $47 = 101111_2$.
- BCD 1001 0011 = $(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 + 5$

```text
    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.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. How does BCD represent the decimal number 47?
   A. 101111
   B. 0010 1111
   C. 0100 1011
   D. 0100 0111
   Answer: D. Each digit is coded separately: 4 = 0100 and 7 = 0111. (Key point: BCD definition)

2. Which 4-bit combinations are invalid in BCD?
   A. 1010 to 1111
   B. 0000 to 0101
   C. 1000 to 1111
   D. 0000 to 1001
   Answer: A. BCD uses only 0000-1001, so six combinations are unused. (Key point: Invalid codes)

3. In 7 + 5 in BCD, 0111 + 0101 = 1100. What correction is applied?
   A. Add 0011
   B. Add 0110 because the digit is above 9
   C. Subtract 0110
   D. No correction is needed
   Answer: B. 1100 is invalid so add 6 to get 1 0010 = 0001 0010 = 12. (Key point: BCD addition)

4. Why is BCD wasteful compared with pure binary?
   A. It needs fewer bits
   B. It cannot show decimal fractions exactly
   C. It needs more bits, e.g. 99 needs 8 bits instead of 7
   D. It uses only 8 combinations
   Answer: C. Six of the 16 combinations are unused, so more bits are needed. (Key point: Disadvantage)

## Related in Digital Logic

- [BCD code and 3-bit binary-to-Gray converter](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Abcd-code-gray-converter) — Digital Logic, chapter 1
- [BCD code advantages and disadvantages](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Abcd-advantages-disadvantages) — Digital Logic, chapter 1
- [(1110)gray→BCD and (1430)₁₀→Excess-3](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Agray-to-bcd-decimal-to-excess3) — Digital Logic, chapter 1
- [Code conversions: (41.8125)₁₀, (1000)₂, (19)₁₀](https://www.bctengineer.com/question.md?key=semester_3%2Fdigital_logic%3Acode-conversions-41-8125) — Digital Logic, chapter 1

## Related in other subjects

- [BCD counter 0-9999 on seven segment VHDL](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Avhdl-bcd-counter-seven-segment) — Embedded System, chapter 9
- [Importance of source coding; Shannon-Fano vs BCD (four symbols)](https://www.bctengineer.com/question.md?key=semester_6%2Fcommunication_systems%3Asource-coding-sf-bcd-four) — Communication Systems, chapter 6
