Binary Coded Decimal (BCD) — TechAmbitionX | Mr. BILRED | Basic Stuff
🔹 1. What is BCD?
BCD (Binary Coded Decimal) is a way of representing decimal numbers (0–9) in binary form using 4 bits for each digit.
Example:
- Decimal 59 → BCD =
0101 1001 - Pure Binary 59 →
111011
Notice how in BCD, each digit is separate (5 = 0101, 9 = 1001). This makes it easier for circuits to display numbers.
🔹 2. Why use BCD?
Normal binary is compact, but BCD is better when numbers need to be shown to humans (digit by digit).
💡 Devices like digital clocks, calculators, counters, and 7-segment displays often use BCD internally.
🔹 3. Rules of BCD
- Each digit = 4 bits (nibble).
- Valid range = 0000 (0) to 1001 (9).
- 1010–1111 are invalid in standard BCD.
🔹 4. BCD Truth Table (0–9)
| Decimal | BCD (8421) |
|---|---|
| 0 | 0000 |
| 1 | 0001 |
| 2 | 0010 |
| 3 | 0011 |
| 4 | 0100 |
| 5 | 0101 |
| 6 | 0110 |
| 7 | 0111 |
| 8 | 1000 |
| 9 | 1001 |
🔹 5. BCD Addition
When adding, if the sum ≥ 10 (1010), add 0110 (6) to adjust it.
9 (1001)
+ 4 (0100)
= 1101 (13, invalid BCD)
+ 0110
= 1 0011 (Carry + 3 → 13 in BCD)
🔹 6. Applications
- BCD to 7-segment decoder (for LED/LCD displays)
- BCD adders & counters (decimal arithmetic in hardware)
- Shift registers (rollover after 9 instead of 15)
🔹 7. Quick Recap
BCD = each decimal digit stored separately in 4-bit binary. ✅ Easier for digital logic & display circuits. ❌ Wastes memory compared to pure binary.
Comments
Post a Comment