BCD to Decimal Converter

Binary-coded decimal gives every decimal digit its own 4-bit group — 8421 code. Convert both ways, with invalid groups (1010–1111) flagged at their exact position.

Result
Waiting for input — conversion happens instantly in your browser.

What Is BCD (Binary-Coded Decimal)?

BCD writes a decimal number in binary by giving each digit its own 4-bit group. The group weights are 8-4-2-1, which is why this flavor is called 8421 BCD.

Take 12: the digit 1 becomes 0001 (0×8 + 0×4 + 0×2 + 1×1), the digit 2 becomes 0010, and the whole number is 0001 0010. Decoding is the same walk in reverse — split into groups of four, read each group as a digit, concatenate. There is no division, no place-value arithmetic across group boundaries, and no rounding: the mapping is one decimal digit per nibble, always.

Only ten of the sixteen possible 4-bit patterns are legal: 0000 through 1001 (0–9). The patterns 1010 through 1111 (10–15) have no meaning in 8421 BCD, and this converter flags them with the exact group number instead of guessing — paste 0001 1010 above to see it happen. If you are new to reading 0s and 1s in general, how to read binary covers the place-value basics, and what is binary code explains where bytes come from in the first place.

BCD vs Pure Binary: Same Number, Different Code

The single most common confusion: 00010010 read as one binary number is 18, but read as BCD it is 12. The bits alone do not tell you which — context does.

DecimalBCD (8421)Pure binaryBCD bitsBinary bits
120001 00100000110088
450100 010110110186
2540010 0101 010011111110128
20250010 0000 0010 0101111111010011611

Pure binary converts the whole value to base 2; BCD converts each decimal digit separately and concatenates the groups. Both spellings above decode in this tool's two directions — and the pure-binary column matches our binary to decimal converter, which is the right page when the bits are one whole number rather than packed digits.

Why BCD Exists — and What It Costs

BCD survives wherever machines must show humans decimal digits. A calculator or digital clock can feed each 4-bit group straight into a seven-segment display driver — no binary-to-decimal division loop in between. Financial systems use BCD-style packed decimal for a different reason: decimal fractions like 0.1 are exact in BCD but infinitely repeating in binary floating point, so money arithmetic stays penny-perfect. COBOL mainframes have stored currency this way for decades; see Wikipedia's binary-coded decimal entry for the packed-decimal variants they use.

One honest limit: BCD wastes space. A three-digit number costs 12 bits in BCD versus 10 in pure binary — about 20% more for the same range — and 8 bits of BCD top out at 99 while 8 bits of pure binary reach 255. BCD pays that price deliberately, buying instant digit-level conversion and exact decimal arithmetic.

Common Mistakes

  • Mistake: reading BCD as one big binary number. 00010010 as pure binary is 18; as BCD it is 12. Correction: split into 4-bit groups first, then read each group as one digit.
  • Mistake: assuming any 4-bit group is legal. Correction: only 00001001 are valid in 8421 BCD. A group like 1100 (12) means corrupt or misaligned data — check for a lost bit before it, not a new digit.
  • Mistake: dropping leading zeros. Correction: leading-zero groups carry real digits — 0000 0111 is 07, not 7. Trimming groups changes the value, which is why this converter keeps them.

Practice

1. Convert 45 to BCD. 4 → 0100, 5 → 0101 — answer: 0100 0101. (Pure binary would be 101101 — same number, different code.)

2. Decode 1001 0111. 1001 = 9, 0111 = 7 — answer: 97. Check both in the converter above.

3. Is 0110 1100 valid BCD? No — the second group 1100 is 12, above the largest legal digit 9 (1001). The converter flags it as group 2.

BCD Converter FAQ

What is BCD (binary-coded decimal)?

BCD is a way to write decimal numbers in binary where each digit 0–9 gets its own 4-bit group, weighted 8-4-2-1. The number 12 becomes 0001 0010 — a 1 group followed by a 2 group — instead of the pure-binary 1100. Each group translates back to exactly one decimal digit.

What is the difference between BCD and binary?

Pure binary converts the whole number to base 2 — 12 becomes 1100. BCD converts each decimal digit separately — 12 becomes 0001 0010. Same value, different spelling: BCD trades storage space for a one-to-one mapping with decimal digits, which is why displays and calculators prefer it.

Why does this converter reject groups like 1010?

Because in 8421 BCD only 00001001 (the digits 0–9) are legal; 1010 through 1111 would mean values 10–15, which no decimal digit can hold. Such a group signals corrupt data, a misaligned bit, or input that was never BCD — the converter flags the exact group instead of guessing.

Where is BCD used today?

Pocket calculators, digital clocks, seven-segment displays and electricity meters use BCD so each digit can drive the display directly. Financial systems use BCD-style packed decimal to avoid floating-point rounding on money, and COBOL mainframes still store currency as packed BCD.

Can BCD store negative numbers or fractions?

Standard 8421 BCD cannot on its own — it only encodes the digits 0–9. Signed variants reserve an extra nibble for the sign (packed decimal uses 1100 for plus and 1101 for minus), and fixed-point formats simply agree on where the decimal point sits. This converter handles unsigned whole numbers only.

Does BCD waste storage space?

Yes — roughly 20% more bits than pure binary for the same range. Eight bits of BCD hold only 0–99, while eight bits of pure binary hold 0–255. BCD pays that price deliberately: instant digit-level conversion with no division and no rounding error.