⚡ Free BCD Converter

Decimal to BCD Converter

Convert decimal numbers to 8421 Binary Coded Decimal instantly. Enter a non-negative whole number and BinaryCon will encode every decimal digit separately into its exact 4-bit BCD representation.

✓ Free ✓ No sign-up ✓ 8421 BCD ✓ Digit-by-digit output
10→BCD
Decimal → BCD
Ready
Digits 0–9
DEC
Enter a non-negative whole number using decimal digits 0–9.
Try:
✓ 8421 BCD Result
0000
Each decimal digit encoded as 4 bits
Decimal Value 0
Decimal Digits 1
BCD Bits 4
Digit mapping:

What Is a Decimal to BCD Converter?

A decimal to BCD converter changes an ordinary decimal integer into Binary Coded Decimal. In standard 8421 BCD, every decimal digit is represented independently with four binary bits.

This differs from ordinary binary conversion. Decimal 45 in pure binary is 101101, but its BCD representation is 0100 0101 because decimal digit 4 is encoded separately from decimal digit 5.

BCD is useful when a system needs direct access to individual decimal digits, such as in display logic, decimal-oriented electronics, counters, educational circuits, or decimal data processing.

Ordinary binary

Represents the complete number as a single magnitude using powers of two.

8421 BCD

Represents every decimal digit separately with one 4-bit group.

How to Use the Decimal to BCD Converter

Enter the decimal integer

Type a value such as 45. Use non-negative whole numbers only.

Separate the decimal digits

Decimal 45 contains two digits: 4 and 5. Decimal 255 contains three digits: 2, 5, and 5.

Encode every digit

BinaryCon replaces each decimal digit with the corresponding 4-bit 8421 BCD group.

Review the mapping

The result card shows the final BCD code and a digit-by-digit conversion breakdown.

Copy the BCD result

Use the grouped output in digital logic, coursework, electronics, documentation, or another BinaryCon tool.

8421 BCD Code Table

Standard 8421 BCD uses four bit positions with weights 8, 4, 2, and 1. Only ten of the sixteen possible 4-bit patterns are used for decimal digits.

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

Worked Example: Convert Decimal 45 to BCD

Decimal 45 contains two separate decimal digits: 4 and 5.

Separate the digits: 45 → 4 | 5 Convert each digit: 4 → 0100
5 → 0101
Join the BCD groups: 45₁₀ → 0100 0101 BCD

Example: Convert Decimal 255 to BCD

Decimal digits: 255 → 2 | 5 | 5 Convert each digit: 2 → 0010
5 → 0101
5 → 0101
Final BCD: 255₁₀ → 0010 0101 0101

Since the decimal number has three digits, it requires three 4-bit BCD groups, or 12 BCD bits.

Decimal to BCD Reference Table

Decimal 8421 BCD BCD Bits
000004
501014
910014
100001 00008
120001 00108
250010 01018
450100 01018
991001 10018
1000001 0000 000012
2550010 0101 010112
9991001 1001 100112
10240001 0000 0010 010016

Why Decimal 10 Is 0001 0000 in BCD

A common mistake is to see ordinary binary 1010 for decimal 10 and assume that it is also the BCD value. It is not.

BCD works with decimal digits. Decimal 10 contains the digit 1 followed by the digit 0.

Decimal 10

Digit 1 → 0001
Digit 0 → 0000

BCD → 0001 0000
Remember: pure binary represents the entire value. BCD represents each decimal digit separately.

BCD vs Ordinary Binary

Decimal Ordinary Binary 8421 BCD
51010101
910011001
1010100001 0000
1511110001 0101
25110010010 0101
451011010100 0101
9911000111001 1001
255111111110010 0101 0101

How Many Bits Does BCD Require?

Standard unpacked 8421 BCD uses exactly four bits for every decimal digit. If a decimal number contains n digits, its BCD representation requires:

BCD bits = 4 × number of decimal digits
Decimal Digits BCD Bits
714
4528
255312
1024416
12345520

Why Are 1010 Through 1111 Invalid BCD Digits?

Four binary bits can represent sixteen patterns, but decimal has only ten digits. Standard 8421 BCD therefore needs only codes for decimal digits 0 through 9.

4-Bit Pattern BCD Status
0000–1001Valid decimal digits 0–9
1010Invalid standard BCD digit
1011Invalid standard BCD digit
1100Invalid standard BCD digit
1101Invalid standard BCD digit
1110Invalid standard BCD digit
1111Invalid standard BCD digit

What Does 8421 Mean in BCD?

The name 8421 refers to the positional weights of the four bits: 8, 4, 2, and 1.

For example, digit 7 has BCD pattern 0111:

0×8 + 1×4 + 1×2 + 1×1 = 4 + 2 + 1 = 7

Digit 9 is 1001 because 8 + 1 = 9.

What About Leading Zeros?

A numeric decimal value normally ignores unnecessary leading zeros. For example, entering 0045 and 45 represents the same ordinary integer.

This calculator normalizes ordinary numeric input, so both produce:

45 → 0100 0101

If you specifically need BCD for a fixed decimal field such as 0045, that is a formatting requirement where the leading decimal zeros would each be encoded as 0000.

Is BCD More Efficient Than Binary?

Generally, no. Pure binary uses available bit patterns more efficiently, while BCD dedicates four bits to every decimal digit and leaves six combinations unused in each digit position.

For decimal 255:

Pure binary: 255 = 11111111 This uses 8 bits. BCD: 2 → 0010
5 → 0101
5 → 0101
Result: 0010 0101 0101 This uses 12 bits.

BCD’s advantage is therefore not compact storage. Its advantage is the direct correspondence between stored groups and decimal digits.

Where Decimal to BCD Conversion Is Used

Digital displays

Digit-oriented systems can use BCD so every decimal digit is available as a separate encoded value.

Electronic counters

Decimal counters and BCD counters naturally work with values 0 through 9 before moving to the next decimal position.

Logic circuit education

BCD is commonly used to teach decoders, counters, digital number representations, and display-driving logic.

Decimal-oriented data

Some applications benefit from keeping decimal digits explicit instead of repeatedly converting a pure binary magnitude.

Common Decimal to BCD Conversion Mistakes

Converting the whole number directly to binary

Pure binary and BCD are different. BCD requires converting each decimal digit separately.

Removing leading zeros inside a BCD group

Each digit always needs four bits. Decimal 2 must be written 0010, not 10.

Using codes above 1001

Standard 8421 BCD uses only 0000 through 1001 for individual digits.

Reading the entire BCD string as ordinary binary

BCD groups must be interpreted digit by digit. For example, 0100 0101 represents decimal 45 in BCD.

Related BinaryCon Tools

Convert between BCD, binary, decimal, and other common number systems using these related tools.

Decimal to BCD Converter FAQs

How do you convert decimal to BCD?

Separate the decimal number into individual digits and replace each digit with its 4-bit 8421 BCD code. For example, decimal 45 contains digits 4 and 5, so it becomes 0100 0101.

What is decimal 9 in BCD?

Decimal digit 9 is 1001 in 8421 BCD because its active weights are 8 and 1.

What is decimal 10 in BCD?

Decimal 10 contains digits 1 and 0. Digit 1 is 0001 and digit 0 is 0000, so decimal 10 becomes 0001 0000 in BCD.

What is decimal 45 in BCD?

Decimal 45 becomes 0100 0101. Digit 4 maps to 0100 and digit 5 maps to 0101.

What is decimal 255 in BCD?

Decimal 255 contains digits 2, 5, and 5. Their BCD codes are 0010, 0101, and 0101. The final result is 0010 0101 0101.

Is BCD the same as binary?

No. Ordinary binary represents the entire numerical value using powers of two. BCD represents each decimal digit separately. Decimal 25 is 11001 in ordinary binary but 0010 0101 in BCD.

Why does BCD use four bits for one decimal digit?

Three bits provide only eight combinations, which is not enough for ten decimal digits. Four bits provide sixteen combinations, so ten can be assigned to digits 0 through 9.

What are the invalid BCD codes?

In standard 8421 BCD, individual digit patterns 1010, 1011, 1100, 1101, 1110, and 1111 are not valid decimal digit codes.

What does 8421 BCD mean?

The four bit positions have weights 8, 4, 2, and 1. For example, 0110 represents decimal digit 6 because 4 + 2 = 6.

How many BCD bits does a number need?

Standard unpacked 8421 BCD uses four bits per decimal digit. A two-digit decimal number uses 8 bits, a three-digit number uses 12 bits, and a four-digit number uses 16 bits.

Can this converter handle very large decimal integers?

Yes. BCD encoding works directly from the decimal digit characters, so very long non-negative whole numbers can be encoded without floating-point rounding.

Does BCD support decimal fractions?

BCD can represent decimal digits on either side of a decimal point, but this calculator is designed for whole-number integers. Fractional BCD requires preserving the decimal-point position separately because the point itself is not one of the four-bit digit codes.

Can BCD represent negative numbers?

The decimal digits themselves can be encoded in BCD, but representing sign requires an additional convention, sign field, or packed-decimal format. This calculator handles non-negative decimal integer digits only.

Why is BCD still useful if binary is more compact?

BCD preserves decimal digits directly. That can simplify decimal displays, decimal counters, certain arithmetic systems, and applications where digit-by-digit decimal handling is more useful than minimum bit usage.

Convert Decimal to BCD Instantly

Use BinaryCon for accurate 8421 BCD encoding, digit-by-digit conversion, verified reference values, and practical decimal and binary tools without registration.

Scroll to Top