BCD to Decimal Converter
Convert Binary-Coded Decimal (BCD) into decimal digits instantly. Enter standard 8421 BCD as four-bit groups, check each decoded digit, and review the conversion step by step. No installation or account is required.
Convert BCD to Decimal
Enter complete four-bit BCD groups. Spaces and underscores are optional.
Valid groups are 0000 through 1001. You may enter 00100101 or 0010 0101. Maximum input length: 4,000 bits, excluding separators.Conversion result
0010 0101
Digit-by-digit breakdown
Each four-bit group represents one decimal digit. Read the decoded digits from left to right.
What Is BCD to Decimal Conversion?
Binary-Coded Decimal, commonly called BCD, is a way to represent decimal numbers using binary bits. In standard 8421 BCD, each decimal digit is encoded separately using exactly four bits.
This differs from ordinary binary, where the complete number is represented as a single base-2 value. To decode BCD correctly, convert every four-bit group independently and join the resulting decimal digits in their original order.
Example: Convert 0010 0101 to decimal
The input contains two four-bit groups:
0010 = 2 0101 = 5Joining the digits gives the result:
0010 0101 (BCD) = 25 (decimal)How to convert BCD to decimal
- Separate the input into groups of four bits, starting from the left.
- Check that each group represents a digit from 0 to 9.
- Convert each valid group to its corresponding decimal digit.
- Join the digits in the same order to form the decimal digit string.
Standard 8421 BCD conversion table
| Decimal digit | BCD code | Calculation |
|---|---|---|
| 0 | 0000 | 0 + 0 + 0 + 0 |
| 1 | 0001 | 1 |
| 2 | 0010 | 2 |
| 3 | 0011 | 2 + 1 |
| 4 | 0100 | 4 |
| 5 | 0101 | 4 + 1 |
| 6 | 0110 | 4 + 2 |
| 7 | 0111 | 4 + 2 + 1 |
| 8 | 1000 | 8 |
| 9 | 1001 | 8 + 1 |
Which BCD codes are invalid?
A four-bit group can represent values from 0 to 15 in ordinary binary. Standard 8421 BCD, however, uses only the ten codes for decimal digits 0 through 9. Therefore, the following groups are invalid as individual BCD digits:
1010, 1011, 1100, 1101, 1110, 1111This calculator reports an error if any of these groups appears, rather than silently interpreting it as a decimal digit.
Leading zeros in BCD
Each BCD group becomes one decimal digit, including zero. For example,
0000 0001 1001 decodes to the digit string 019.
The leading zero is retained because it is part of the decoded
representation. This can be useful for fixed-width displays,
identifiers, and digital systems.
BCD versus ordinary binary
BCD and binary are different encodings. Decimal 12 is represented
in standard BCD as 0001 0010, because the digits 1 and 2
are encoded separately. Ordinary binary for the number 12 is
1100.
Frequently Asked Questions
How do I convert BCD to decimal?
Split the BCD input into four-bit groups, convert each valid group to a decimal digit from 0 to 9, and join the digits from left to right.
What is 0101 in BCD?
The BCD group 0101 represents the decimal digit 5.
What is 0010 0101 in BCD?
The first group, 0010, represents 2. The second group,
0101, represents 5. The complete decimal result is 25.
Why is 0010 0101 BCD not decimal 37?
Reading all eight bits as ordinary binary gives 37. In BCD, each four-bit group is decoded separately, so the same bits represent the decimal digits 2 and 5, giving 25.
Is 1010 a valid BCD digit?
No. In standard 8421 BCD, valid digit groups range from
0000 to 1001. The group
1010 is invalid because it represents 10 in ordinary
binary, not a single decimal digit.
Can I enter BCD without spaces?
Yes. You can enter a continuous bit string such as
00100101 or separate groups as
0010 0101. The number of bits must be divisible by four.
Does this converter preserve leading zeros?
Yes. The output is treated as a decimal digit string rather than being converted into a JavaScript number, so leading zero digits are preserved.
Does this tool support signed or packed BCD?
This calculator is designed for standard unsigned 8421 BCD with four bits per decimal digit. Signed BCD, packed decimal sign nibbles, and other BCD variants require their own format rules.
Related Binary and Digital Logic Tools
Explore these related calculators on Binarios.org to convert values between number systems and perform binary arithmetic.