BCD Converter (Binary-Coded Decimal)
Convert
Binary-coded decimal (BCD) encodes each decimal digit in its own 4-bit group instead of converting the whole number to binary. The number 2026 becomes 0010 0000 0010 0110 — one nibble per digit. BCD keeps the decimal digits visible, which is why it shows up in seven-segment displays, real-time clock chips, calculators and financial hardware where exact decimal rounding matters. The cost is wasted bit space and the fact that nibble values 1010-1111 are illegal. This tool converts a decimal number into its 8421 BCD bit pattern and packed-BCD hex bytes, and converts a BCD bit string back to decimal, rejecting any nibble above 9.
20260010 0000 0010 011020 26BCD encodes each decimal digit in its own 4 bits (8421). Nibbles 1010-1111 are illegal. Packed BCD stores two digits per byte.
How to use
- Choose whether your input is a decimal number or a BCD bit string.
- Type the value; the decimal, BCD binary and packed-BCD hex update instantly.
- Each decimal digit is shown with its 4-bit nibble below the result rows.
Frequently asked questions
- How is BCD different from plain binary?
- Plain binary converts the whole number at once (2026 = 11111101010). BCD encodes each decimal digit separately in 4 bits (2 0 2 6 = 0010 0000 0010 0110), so the decimal digits stay readable.
- What is packed BCD?
- Packed BCD stores two decimal digits per byte — one digit in the high nibble, one in the low. So 2026 packs into the hex bytes 20 26. It is the common storage form in RTC chips and older CPUs.
- Why is 1010 not valid BCD?
- A nibble can only represent decimal digits 0-9 (0000-1001). The patterns 1010 through 1111 (10-15) have no decimal digit, so they are invalid in standard 8421 BCD.
- Where is BCD used?
- Seven-segment LED displays, real-time clock and calendar chips, pocket calculators, and any system that must show or round numbers in exact decimal without binary fraction error.
Related tools
Gray Code Converter
Convert between decimal, binary and reflected-binary Gray code, both directions, with an optional fixed bit width and a 0-7 reference table.
Two's Complement Converter (8–64 bit)
Enter a decimal, hex, binary, or octal value and see its 8/16/32/64-bit two's complement bit pattern, plus its signed and unsigned readings, hex, octal, and one's complement — in your browser.
IEEE 754 Float Converter (32 & 64-bit)
See the exact IEEE 754 bit layout of any number in float32 and float64 — sign, exponent, and mantissa bits, hex, the stored value, and rounding — or decode hex bits back to a number, all in your browser.
Roman Numeral Converter
Convert between Arabic numbers and Roman numerals from 1 to 3999.
Number Base Converter
Convert numbers between binary, octal, decimal, and hexadecimal.
Unit Converter
Convert length, weight, temperature, area, volume, speed, and time.