Free online number converter

Decimal to BCD Converter

Convert decimal numbers into standard 8421 Binary-Coded Decimal (BCD) online. Each decimal digit becomes a separate four-bit group. View the complete BCD code, digit-by-digit mapping, ordinary binary comparison, and step-by-step conversion details.

Convert Decimal to BCD

Enter a whole number using digits 0–9, then select Convert to BCD.

Enter a non-negative whole number using decimal digits only. Leading zeros are preserved. 2 / 1,000

BCD Conversion Results

Each four-bit group represents one decimal digit in 8421 BCD.

Decimal digits
0
BCD bits
0
BCD nibbles
0

8421 BCD Output

BCD Without Spaces

Digit-by-Digit Conversion

Position Decimal digit 8421 BCD Bit weights

Ordinary Binary Comparison

This is the conventional base-2 representation of the complete integer. It is different from the BCD representation above.

Decimal to BCD Examples

Choose a number to see its 8421 BCD representation.

What Is Binary-Coded Decimal (BCD)?

Binary-Coded Decimal is a way of representing decimal numbers in binary form. In standard 8421 BCD, each decimal digit from 0 through 9 is encoded separately as a four-bit group. The four bit positions have weights 8, 4, 2 and 1.

For example, decimal 59 contains the digits 5 and 9. Digit 5 maps to 0101, and digit 9 maps to 1001. Therefore, the BCD representation is 0101 1001. The groups retain the individual decimal digits instead of encoding the complete number as one base-2 value. Learn more about BCD encoding.

How to Convert Decimal to BCD

  1. Write the decimal number as a sequence of individual digits.
  2. Find the four-bit 8421 BCD code for each digit.
  3. Keep the four-bit groups in the same order as the decimal digits.
  4. Join the groups, optionally separating them with spaces for readability.

For example, converting 847 to BCD works as follows:

  • Digit 8 becomes 1000.
  • Digit 4 becomes 0100.
  • Digit 7 becomes 0111.

The final result is 1000 0100 0111.

8421 BCD Conversion Table

Use this reference table to look up the standard BCD code for each decimal digit.

Decimal digit 8 4 2 1 8421 BCD
000000000
100010001
200100010
300110011
401000100
501010101
601100110
701110111
810001000
910011001

BCD vs Ordinary Binary

BCD and ordinary binary both use the digits 0 and 1, but they encode numbers differently. Ordinary binary converts the complete integer into base 2. BCD converts each decimal digit into its own four-bit code.

Decimal 8421 BCD Ordinary binary
910011001
120001 00101100
250010 010111001
590101 1001111011
8471000 0100 01111101001111
Key difference: BCD is useful when a system needs to preserve decimal digits for display or decimal-oriented processing. It generally uses more bits than ordinary binary for the same integer.

Where Is BCD Used?

  • Digital clocks, counters and decimal displays.
  • Digital electronics and educational logic-circuit exercises.
  • Systems that represent decimal digits directly.
  • BCD arithmetic and decimal-to-display conversion circuits.

Frequently Asked Questions

1. What does a decimal to BCD converter do?

It converts every decimal digit into a four-bit 8421 BCD group and joins the groups in their original order.

2. What is the BCD representation of 59?

Decimal 59 becomes 0101 1001: digit 5 is 0101 and digit 9 is 1001.

3. Is BCD the same as binary?

No. Decimal 59 is 111011 in ordinary binary and 0101 1001 in 8421 BCD.

4. Can I convert numbers with leading zeros?

Yes. The converter preserves leading zeros, so an input such as 0075 is encoded as 0000 0000 0111 0101.

5. What about decimal fractions or negative numbers?

This calculator handles non-negative whole numbers. Fractional values require a separate decimal-point convention, and signed BCD systems may use additional sign representations.

6. Which BCD codes are valid?

In standard 8421 BCD, only groups 0000 through 1001 represent decimal digits. The patterns 1010 through 1111 are invalid as individual 8421 BCD digits.

Related Binary Converters and Calculators

Continue exploring number systems and digital logic with these tools.

Visit the Binarios.org homepage to explore more tools, or read about the site on About Us.