TOP

Free exact browser converter

BCD to Binary Converter

Convert 8421 BCD digits to a binary integer online. Validate every four-bit group, reject invalid digits, and preserve large values with BigInt.

No signupRuns locally in your browser

Interactive tool

Convert BCD to Binary

Ready

Output format

Choose a clear output representation.

Detailed conversion guide

How to Convert BCD to Binary

Decode each four-bit 8421 BCD group as one decimal digit. Join those digits into a decimal integer, then write its ordinary binary representation. BCD 0101 1001 means decimal 59, so its binary output is 111011.

Reading the BCD bits as one binary number would give 89 instead of 59. Group boundaries are validated before conversion; an invalid digit anywhere clears the whole result. BigInt keeps large integers exact.

InputOutputMeaning
00000zero
0001 00001010decimal 10
0101 1001111011decimal 59
1001 10011100011decimal 99

Decode BCD Digits before Binary Conversion

The algorithm validates the representation before exact integer conversion, so malformed input never produces a plausible partial answer.

const groups = bcd.trim().split(/\s+/);
if (groups.some(g => !/^[01]{4}$/.test(g) || parseInt(g, 2) > 9))
  throw Error("Invalid 8421 BCD");
const digits = groups.map(g => parseInt(g, 2)).join("");
const binary = BigInt(digits).toString(2);

Valid BCD Groups and Numeric Leading Zeros

Nibbles 1010–1111 are invalid 8421 digits. Incomplete groups, signs, and fractions are rejected. This tool accepts binary BCD groups; it does not read packed hexadecimal bytes, signed BCD, or excess-3.

Leading BCD zero digits do not change the integer and are removed in binary output. Zero is emitted as 0. Spaces separate complete BCD digits, not a list of independent values.

Related converters

Choose the converter for the input and output formats you are working with.

Advertisement

Sponsored link