BCD (Binary Coded Decimal) — What It Is and How to Convert
Learn Binary Coded Decimal (BCD) encoding with step-by-step conversion examples. Understand 8421 BCD, packed vs unpacked BCD, and applications in digital systems.
Introduction
Binary Coded Decimal (BCD) is a special encoding system where each decimal digit is represented individually as a 4-bit binary pattern. Unlike pure binary conversion (where the entire number converts to one binary value), BCD treats each digit of the decimal number separately. This concept appears frequently in BCA, BTech, and diploma courses under digital electronics and computer architecture.
What is BCD?
In BCD (specifically 8421 BCD, the most common type), each decimal digit from 0 to 9 maps to its 4-bit binary equivalent:
| Decimal Digit | BCD (4 bits) |
|---|---|
| 0 | 0000 |
| 1 | 0001 |
| 2 | 0010 |
| 3 | 0011 |
| 4 | 0100 |
| 5 | 0101 |
| 6 | 0110 |
| 7 | 0111 |
| 8 | 1000 |
| 9 | 1001 |
Patterns 1010 through 1111 (10–15) are invalid in BCD because they don’t correspond to any single decimal digit.
BCD vs Pure Binary
This is the most important distinction students must understand:
Decimal 25 in pure binary: 11001 (single binary number) Decimal 25 in BCD: 0010 0101 (each digit encoded separately)
BCD uses more bits but maintains a direct, readable mapping to decimal digits.
How to Convert Decimal to BCD
Steps:
- Take each decimal digit individually
- Convert each digit to its 4-bit binary equivalent
- Concatenate all 4-bit groups
Example 1: Convert 47 to BCD
- 4 → 0100
- 7 → 0111
BCD Result: 0100 0111
Example 2: Convert 839 to BCD
- 8 → 1000
- 3 → 0011
- 9 → 1001
BCD Result: 1000 0011 1001
Example 3: Convert 2056 to BCD
- 2 → 0010
- 0 → 0000
- 5 → 0101
- 6 → 0110
BCD Result: 0010 0000 0101 0110
How to Convert BCD to Decimal
Steps:
- Separate the BCD number into groups of 4 bits (from the right)
- Convert each 4-bit group to its decimal digit
- Combine the digits
Example: Convert BCD 1001 0100 0011 to Decimal
- 1001 → 9
- 0100 → 4
- 0011 → 3
Decimal Result: 943
Packed vs Unpacked BCD
| Type | Storage | Example (digit 5) |
|---|---|---|
| Packed BCD | Two digits per byte | 0101 xxxx (shares byte) |
| Unpacked BCD | One digit per byte | 0000 0101 (upper nibble zeros) |
Packed BCD is more storage-efficient. Unpacked BCD is simpler to process in software.
Advantages of BCD
- Exact decimal representation — No rounding errors for decimal values
- Easy display conversion — Each nibble maps directly to one display digit
- Simple hardware — Seven-segment decoders work directly with BCD
- Financial accuracy — Banking and accounting avoid floating-point errors
Disadvantages of BCD
- Wastes storage — Uses more bits than pure binary (6 invalid patterns per nibble)
- Slower arithmetic — BCD addition requires correction when sum exceeds 9
- Limited range — 8 bits of BCD stores 0–99; 8 bits of binary stores 0–255
BCD Addition and the “Add-6” Correction
When adding BCD numbers, if a nibble sum exceeds 9 or produces a carry, add 6 (0110) to correct:
Example: 7 + 8 in BCD
0111 (7)
+ 1000 (8)
──────
1111 (15 — invalid BCD!)
+ 0110 (add 6 correction)
──────
10101 → 0001 0101 = 15 in BCD ✓
Applications
- Digital clocks and timers (seven-segment displays)
- Financial calculators and point-of-sale systems
- Microcontroller interfacing with numeric displays
- Legacy mainframe COBOL programs
- Exam questions in digital electronics courses
Try It Online
Use the free BCD Converter on Numverto to convert between decimal and BCD instantly. The tool shows the nibble breakdown for each digit and validates BCD inputs automatically.
Frequently Asked Questions
What does “8421” mean in 8421 BCD?
The name “8421” refers to the positional weights of the four bits: 8, 4, 2, 1. These weights are the same as standard binary place values. Other BCD variants exist (like Excess-3) but 8421 is the most common.
Is BCD the same as binary?
No. Binary encodes the entire number as one value. BCD encodes each decimal digit separately as 4 bits. For example, decimal 12 is 1100 in binary but 0001 0010 in BCD.
Why is 1010 invalid in BCD?
BCD represents decimal digits 0–9 only. The 4-bit patterns 1010 through 1111 (10–15 in binary) don’t correspond to any single decimal digit, so they are invalid in BCD encoding.
Where is BCD used in real life?
BCD is used in digital clocks, calculators, ATM displays, financial systems requiring exact decimal accuracy, and seven-segment display drivers in embedded hardware.
How many BCD digits fit in one byte?
Two BCD digits fit in one byte (packed BCD). Each digit uses 4 bits (one nibble), and one byte has 8 bits. So one byte can store values from 00 to 99 in packed BCD format.
Free tools
Learn faster with Numverto
Free number system converters, binary tools, EMI calculators, and more, with step-by-step working.
Written by
Numverto Editorial Team
Founder of Numverto. MCA graduate, full-stack developer, and lifelong learner who built this platform so every student gets the explanation, not just the answer.
Related tools
More from Numverto Blog
ieee754
IEEE 754 Floating Point Explained Sign, Exponent & Mantissa
Master IEEE 754 floating point format sign, exponent, mantissa explained with real conversion examples for exams and coding interviews.
13 July 2026
IEEE 754 Standard
Why Does 0.1 + 0.2 Equal 0.30000000000000004? Floating-Point Errors Explained
Understand why computers produce floating-point precision errors, how the IEEE 754 standard stores decimal numbers in binary, why rounding occurs, and the best practices developers use to write accurate, reliable code.
1 July 2026
Discussion