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.
Interactive tool
Convert Binary to BCD
Ready
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.
| Input | Output | Meaning |
|---|---|---|
0 | 0000 | decimal 0 |
1 | 0001 | decimal 1 |
1010 | 0001 0000 | decimal 10 |
111011 | 0101 1001 | decimal 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
Continue with exact representation converters
Use one canonical page for the precise input and output direction you need.