Hisaab Lagao

BCD & Decimal Converter

About the BCD & Decimal Converter

What is Binary Coded Decimal (BCD)?

Binary Coded Decimal (BCD) is a method of encoding decimal numbers in which each digit of the number is represented by its own binary sequence—typically using 4 bits per digit. This means each decimal digit (0–9) is converted to its 4-bit binary equivalent.

For example, the decimal number 186 is represented in BCD as 0001 1000 0110, since:

  • 1 is represented as 0001
  • 8 is represented as 1000
  • 6 is represented as 0110

How Does the Conversion Work?

Converting between BCD and Decimal involves handling each digit separately:

  • BCD to Decimal: Remove any spaces from the BCD input, split the string into groups of 4 bits, and convert each group to its corresponding decimal digit.
  • Decimal to BCD: Convert each decimal digit to its 4-bit binary equivalent and combine them—spaces can be added for clarity.

Applications of BCD

BCD is commonly used in digital systems that require direct decimal representation. It is especially useful in:

  • Digital clocks and calculators
  • Systems where accurate decimal display is critical, such as financial devices

Limitations and Considerations

While BCD simplifies the conversion between binary and decimal, it is less space-efficient than pure binary. Each decimal digit is stored in 4 bits, though only 10 of the 16 possible values are used.

Examples

Decimal to BCD

To convert decimal 186 to BCD:

1 → 0001, 8 → 1000, 6 → 0110; so, 186 is represented as 0001 1000 0110 in BCD.

BCD to Decimal

For example, converting BCD 0100 0011:

0100 equals 4 and 0011 equals 3, so the BCD represents the decimal number 43.