TOP

Free exact browser converter

Binary to BCD Converter

Convert binary integers to 8421 BCD groups online with exact BigInt arithmetic, strict binary validation, and clear decimal-digit boundaries.

No signupRuns locally in your browser

Interactive tool

Convert Binary to BCD

Ready

Output format

Choose a clear output representation.

Detailed conversion guide

How to Convert Binary to BCD

Parse the binary integer exactly, convert it to decimal digits, then encode each decimal digit as a separate four-bit 8421 BCD nibble. Binary 111011 is decimal 59 and becomes BCD 0101 1001.

BCD is usually longer than ordinary binary because each decimal digit always occupies four bits. BigInt keeps long binary inputs exact without Number rounding.

InputOutputMeaning
00000decimal 0
10001decimal 1
10100001 0000decimal 10
1110110101 1001decimal 59

Binary to BCD with Exact Decimal Digits

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

const value = BigInt(`0b${bits}`);
const bcd = [...value.toString(10)].map(d => (+d).toString(2).padStart(4,'0'));

Binary Validation, BCD Width, and Unsupported Signs

Only non-negative whole binary integers are supported. A digit other than 0 or 1, a sign, or a fractional point produces no partial output.

Space-separated BCD exposes digit boundaries; compact output must still be read in four-bit groups. This page does not implement double dabble timing or hardware gate simulation.

Related converters

Use one canonical page for the precise input and output direction you need.

Advertisement

Sponsored link