Binary Coded Decimal (BCD) Explained – 8421 Code, Conversion, and Practical Applications

Introduction

In digital electronics and computer systems, several binary codes are used for different applications. One of the most commonly used codes is Binary Coded Decimal (BCD).

Since we live in a decimal (base-10) world, we need a method to convert decimal numbers into a binary (base-2) format that computers can understand. The Binary Coded Decimal system allows us to perform this conversion efficiently.


What is Binary Coded Decimal (BCD)?

An n-bit binary code can represent up to 2n different combinations of 0s and 1s. In the BCD system, each decimal digit (0–9) is represented by a group of four binary bits. Since decimal digits range from 0 to 9, we need a minimum of 4 bits to represent each digit.

Important: BCD is NOT the same as hexadecimal.

The following 6 combinations are invalid (forbidden) in BCD:

1010 (10), 1011 (11), 1100 (12), 1101 (13), 1110 (14), 1111 (15)

Although 4 bits can represent 16 combinations, BCD uses only 10. Therefore, BCD is slightly wasteful in terms of bit usage.


8421 Weighted Code

BCD is also known as the 8421 code because the four bits have the following weights:

Each decimal digit is converted into its 4-bit binary equivalent using these weights.


Example: Decimal to BCD Conversion

Example 1: Convert 35710 into BCD.

3 → 0011
5 → 0101
7 → 0111

Result:

35710 = 0011 0101 0111 (BCD)


Truth Table for BCD (8421 Code)

Decimal BCD (8421)
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001

More Decimal to BCD Examples

8510

8 → 1000
5 → 0101

BCD = 1000 0101

57210

5 → 0101
7 → 0111
2 → 0010

BCD = 0101 0111 0010

857910

BCD = 1000 0101 0111 1001


BCD to Decimal Conversion

To convert BCD to decimal:

  1. Divide the binary number into groups of four bits (starting from the right).
  2. Convert each 4-bit group into its decimal equivalent.

Example:

0011 0101 (BCD)

0011 → 3
0101 → 5

Result: 3510

If any 4-bit group is greater than 1001 (9), it is an invalid BCD number.


Advantages of BCD


Disadvantages of BCD


BCD in Digital ICs

BCD is widely used with 7-segment displays. Several integrated circuits (ICs) support BCD operations:

These ICs convert 4-bit BCD input into signals required to drive 7-segment displays.


BCD Summary

Binary Coded Decimal (BCD) is a 4-bit binary representation of a decimal digit. Each decimal digit from 0 to 9 is encoded separately using the 8421 weighted system. Although BCD is less efficient than pure binary, it is extremely useful in digital electronics, calculators, counters, and display systems where decimal representation is required. Understanding BCD is essential for students of digital electronics, microprocessors, and embedded systems.