%3C/text%3E%3C/svg%3E">
💻
💻 Tech & IT

BCD (Binary-Coded Decimal) Converter

Results update as you type.

Your numbers

Understanding the BCD converter — concept and principle

Binary-coded decimal (BCD) stores each decimal digit separately in four bits instead of converting the whole number to binary. It wastes some space, but the digits can be displayed or printed without any division, and decimal amounts are represented exactly. BCD is found in seven-segment display drivers, many real-time clock chips, some financial and legacy mainframe formats, and digital logic courses. This converter shows the standard 8421 BCD and the Excess-3 code for a decimal number.

2026 in BCD and Excess-3Digits 2, 0, 2, 6 become 0010 0000 0010 0110 in BCD; adding 3 gives 5, 3, 5, 9, or 0101 0011 0101 1001 in Excess-3.Each decimal digit gets its own 4 bits200102+3=50101000000+3=30011200102+3=50101601106+3=91001BCD 8421Excess-3: add 3 firstBCD0010 0000 0010 0110Excess-30101 0011 0101 1001
BCD stores 2026 digit by digit instead of as one binary number.

How it is calculated

The principle

Four bits can hold 16 patterns but a decimal digit needs only 10, so BCD uses 0000–1001 and leaves 1010–1111 unused. Because each nibble is one digit, a byte holding two digits (packed BCD) reads the same in hexadecimal as in decimal, which is why a clock register showing 0x59 means 59 seconds. Excess-3 is self-complementing: inverting every bit of a digit gives the code of 9 minus that digit, which simplified subtraction in early decimal machines. When BCD digits are added, a sum above 9 must be corrected by adding 6 to skip the six unused patterns.

Worked example

  1. Input: 2026, digits 2, 0, 2, 6.
  2. BCD: 2 = 0010, 0 = 0000, 2 = 0010, 6 = 0110, giving 0010 0000 0010 0110.
  3. Excess-3: add 3 to each digit: 5, 3, 5, 9.
  4. In four bits: 0101, 0011, 0101, 1001, giving 0101 0011 0101 1001.
  5. Check the complement rule on the last digit: inverting 1001 (6 + 3) gives 0110, which is 3 + 3, the Excess-3 code of 9 − 6 = 3.

How to read the result

Read the output four bits at a time from left to right; each group is one decimal digit. Packed into bytes, 2026 becomes 0x20 0x26. Plain binary of 2026 is 11111101010, only 11 bits, versus 16 bits in BCD. In general BCD spends 4 bits per digit where binary needs about 3.32 (log₂ 10), roughly 20% more storage for easy decimal handling.

Common mistakes

Keep in mind: Negative numbers and fractions need an agreed format, such as a sign nibble in packed decimal or a fixed decimal-point position, which differ between systems. Check the specification of your device or file format.

Frequently asked questions

Why do clock chips use BCD?

The time can be sent straight to a display digit by digit, without converting from binary.

Is BCD the same as hexadecimal?

No, but a byte of packed BCD looks like the decimal number when written in hex, because only the digits 0–9 appear in each nibble.

What is the Excess-3 code of 0?

0011, because 0 + 3 = 3.

Sources: M. Morris Mano and Michael D. Ciletti, Digital Design, Pearson (binary codes: BCD, Excess-3)

Checked 8 Nov 2026. Standard formulas and RFC/IEEE definitions, computed locally in your browser — nothing you type is sent anywhere.

💻 All tech & IT tools →🌍 Calculators by country →