Convert decimal numbers to Binary-Coded Decimal (BCD) with digit-by-digit 4-bit encoding
Input Decimal
Result
BCD
Step-by-Step Derivation
Decimal to BCD Principle
0 = 0000, 1 = 0001, 2 = 0010, 3 = 0011
4 = 0100, 5 = 0101, 6 = 0110, 7 = 0111
8 = 1000, 9 = 1001
Each digit → 4-bit nibble, concatenate all
Convert each decimal digit to a 4-bit nibble, then concatenate all nibbles to form the complete BCD representation.
⚠Only decimal digits 0-9 are allowed. Each digit is encoded as a 4-bit nibble.
What Is BCD?
Binary-Coded Decimal (BCD) encodes each decimal digit (0-9) as a 4-bit binary nibble. This preserves decimal precision and simplifies display conversion.
4-bit per Digit
Each decimal digit gets exactly 4 bits: 0=0000, 9=1001.
Easy Decoding
Just split into 4-bit groups and decode each nibble directly.
Precision Preserved
No rounding errors like binary floating point - perfect for finance.
Display Friendly
Directly maps to seven-segment displays and decimal output.
Financial CalculationsDigital DisplaysDigital ClocksLegacy SystemsPrecision Math
Frequently Asked Questions
How do you convert decimal to BCD?▼
For each decimal digit (0-9), convert it to a 4-bit binary nibble: 0=0000, 1=0001, 2=0010, ..., 9=1001. Concatenate all nibbles to form the final BCD.
What is BCD 8421 code?▼
BCD 8421 is the standard Binary-Coded Decimal where each decimal digit is 4 bits with weights 8, 4, 2, 1 from left to right.
What is the BCD for 123?▼
1=0001, 2=0010, 3=0011. Concatenated: 000100100011. Each digit gets its own 4-bit nibble.
Why use BCD instead of binary?▼
BCD preserves decimal precision, simplifies decimal display/conversion, avoids rounding errors, and is ideal for financial calculations and digital displays.
Free online calculators and tools covering mathematics, unit conversion, text processing, and daily life. Accurate, fast, mobile-friendly, and completely free to use.