BCD to Decimal Converter

Enter a BCD value as binary in 4-bit groups to convert it to decimal.

How it is calculated

The tool reads a string of 0s and 1s as binary-coded decimal, where each group of 4 bits (a nibble) is one decimal digit. Spaces are removed first, so it makes no difference whether you type the groups apart or together, but the number of bits must be a multiple of 4. Each nibble is converted on its own, 8·b₃ + 4·b₂ + 2·b₁ + b₀, and the digits are written one after another from left to right. A nibble above 1001 (9), such as 1010 to 1111, is not a valid BCD digit, so the tool then returns no result. Leading zero digits are dropped, and an all-zero input shows 0. Only whole, unsigned numbers are handled: there is no sign nibble and no decimal point. Note that BCD is not ordinary binary: the decimal digits are never added up with place values like 100 or 10.

Worked example

Decode 0001 0010 0101. Step 1: split into nibbles, which are 0001, 0010 and 0101. Step 2: convert each one on its own. 0001 is 1, 0010 is 2 and 0101 is 5. Step 3: write the digits in order, 1, 2, 5. The decimal result is 125. Ordinary binary would write 125 as 1111101, which is quite different from the 12-bit BCD pattern above.

Try this example →

Common mistakes

  • Reading the whole string as one ordinary binary number. 000100100101 as plain binary is 293, but as BCD it is 125; the grouping into 4 bits is what matters.
  • Entering a bit count that is not a multiple of 4. A value such as 010 or 10010 returns no result; pad on the left with zeros to fill the first nibble.
  • Using nibbles above 1001. The patterns 1010 to 1111 do not exist in BCD, so 1010 0001 is rejected rather than read as 101.
  • Entering a decimal or hexadecimal number, such as 47, in the BCD field. Only 0 and 1 are accepted. Type 47 as 0100 0111.
  • Expecting a sign or fraction to be decoded. Some BCD formats add a sign nibble or a decimal point position, but this tool treats every nibble as a digit of a positive whole number.

About this calculator

This converter decodes binary-coded decimal (BCD), an encoding where each individual decimal digit (0–9) is stored in its own 4-bit binary group rather than converting the whole number to pure binary — for example, decimal 47 is stored as two nibbles, 0100 (4) and 0111 (7), not as the pure-binary 101111.

BCD trades some storage efficiency (since 4 bits can represent up to 15 but only 0–9 are used) for the ability to convert to and from decimal instantly, digit by digit, with no rounding or conversion error — which is exactly why it's long been favored in digital clocks, calculators, seven-segment displays and financial/accounting hardware where exact decimal representation matters.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    To verify a BCD value from a datasheet or debugger, write the byte in hex and read it as plain digits, because each hex digit matches one nibble. The byte 0101 1001 is 59 in hex, so it decodes to 59 here. Real-time clock chips commonly keep seconds, minutes and hours this way, so a register reading 0010 0011 is 23. Which device or protocol are you decoding, and does it use a sign nibble?

Popular calculators

All Calculators