BCD to Binary Converter

Parses space-separated 4-bit BCD nibbles, rejects any nibble outside the valid 0-9 range, reconstructs the decimal integer they encode, and converts that integer to binary. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-27

Overview

Introduction

Binary-Coded Decimal stores each decimal digit as its own 4-bit nibble, which is convenient for digit-by-digit display but isn't a number a computer can do binary arithmetic on directly.

This tool reverses that encoding: it decodes a sequence of BCD nibbles back into the plain binary value they represent.

What Is BCD to Binary Converter?

A decoder for Binary-Coded Decimal input: give it space-separated 4-bit nibbles and it reconstructs the decimal number they encode, then converts that number to binary.

It's the inverse of the Binary to BCD Converter, so round-tripping a value through both tools should return your original input.

How BCD to Binary Converter Works

Each whitespace-separated token is validated as exactly 4 binary digits and checked to ensure its value doesn't exceed 9 (nibbles 1010-1111 are rejected as invalid BCD).

The decoded digits are concatenated into a decimal digit string, parsed as a BigInt, and converted to binary with `toString(2)`.

When To Use BCD to Binary Converter

Use it when you have data captured from a BCD-based system (old calculators, digital clocks, some embedded sensors) and need the equivalent plain binary value.

It's also a useful check when learning BCD, to confirm you've decoded a nibble sequence correctly by hand.

Often used alongside Binary to BCD Converter.

Features

Advantages

  • Strictly validates every nibble, catching invalid BCD values (10-15) rather than silently misinterpreting them.
  • Uses BigInt internally, so it handles arbitrarily long digit sequences without precision loss.
  • Clear, position-specific error messages when a nibble is malformed or out of range.

Limitations

  • Expects nibbles separated by whitespace; it doesn't attempt to auto-detect nibble boundaries in a contiguous unspaced string.
  • Only supports unsigned BCD; there's no support for signed BCD representations (like ten's-complement BCD).

Examples

Two BCD nibbles to binary

Input

0001 0101

Output

1111

Nibble 0001 decodes to digit 1 and 0101 to digit 5, giving decimal 15, which is binary 1111.

Three BCD nibbles to binary

Input

0010 0000

Output

10100

Nibble 0010 decodes to digit 2 and 0000 to digit 0, giving decimal 20, which is binary 10100.

Best Practices & Notes

Best Practices

  • Separate each nibble with a space so the tool can unambiguously identify nibble boundaries.
  • Use the Binary to BCD Converter afterward on your result to confirm it round-trips back to the same nibbles.

Developer Notes

Implemented with `parseInt(token, 2)` for per-nibble decoding and validation, then JavaScript BigInt for the final decimal-to-binary conversion so arbitrarily long digit sequences don't lose precision.

BCD to Binary Converter Use Cases

  • Decoding BCD data captured from legacy hardware or protocols into usable binary
  • Validating that a sequence of nibbles is actually well-formed BCD
  • Teaching or verifying manual BCD-to-binary decoding

Common Mistakes

  • Entering a nibble like 1100 (12) expecting it to be accepted; only 0000-1001 (0-9) are valid BCD digits.
  • Omitting spaces between nibbles, which prevents the tool from telling where one 4-bit group ends and the next begins.

Tips

  • If you're unsure whether your nibbles are valid BCD, this tool's validation error will tell you exactly which one and why.
  • Chain the output into another binary tool (like the Binary Parity Calculator) to continue working with the decoded value.

References

Frequently Asked Questions