Binary to BCD Converter with Step-by-Step Visualization
Change the binary input for an instant result, then play the conversion step by step.
Examples
Input
Output
Convert binary to binary-coded decimal (BCD) instantly. Enter a binary number, copy the result, or watch the visualization to see how each decimal digit becomes a four-bit BCD group.
Purpose of BCD
BCD represents each decimal digit separately with four bits. This lets a decimal display circuit handle one digit at a time. A BCD-to-seven-segment decoder reads a digit’s four bits and lights the matching display segments.
For example, decimal 45 has two digits: 4 and 5. BCD represents them as 0100 0101, while ordinary binary represents the whole number as 101101.
How to Convert Binary to BCD
- Find the decimal value. Read the binary place values from right to left: 1, 2, 4, 8, and so on. Add only the values with a 1 bit.
- Separate the decimal digits. Keep their left-to-right order.
- Convert each digit to four bits. Use the weights 8, 4, 2, 1 from left to right. Choose the weights that add up to the digit. Write 1 for each weight you use and 0 for the others.
- Join the groups. Keep a space between each four-bit group.
Example: 101101₂ → 45₁₀ → 0100 0101 in BCD.
The converter ignores spaces in your input. Leading binary zeros do not change the result. For zero, write 0000.
The converter calculates the full BCD result without rounding. You can watch the conversion steps for decimal values up to 99,999.
Binary to BCD Examples
| Binary | Decimal | BCD |
|---|---|---|
0 | 0 | 0000 |
111 | 7 | 0111 |
1100 | 12 | 0001 0010 |
101101 | 45 | 0100 0101 |
Keep all four bits in each group, including leading zeros. In 8421 BCD, each group represents a digit from 0 to 9: 0000 to 1001. The groups 1010 to 1111 do not represent decimal digits.
Key terms
| Term | Meaning |
|---|---|
| Bit | A binary digit: 0 or 1. |
| BCD | Binary-coded decimal: a code that represents each decimal digit separately. |
| 8421 | The BCD form that uses four bits with weights 8, 4, 2, 1. |