DE Notes
Complete guide to BCD (Binary Coded Decimal) code: 8421 weighting, BCD addition, BCD subtraction, advantages, limitations, and comparison with pure binary. GATE-level coverage.
What is BCD?
BCD (Binary Coded Decimal) is a class of binary encoding where each decimal digit (0–9) is represented independently using a 4-bit binary code.
The name "8421" comes from the positional weights: 8, 4, 2, 1 (standard binary weights for 4 bits).
Key rule: Only the combinations 0000 to 1001 are valid BCD digits. Codes 1010 through 1111 are invalid/forbidden in BCD.
Converting BCD to Decimal
Group bits in sets of 4 from right; convert each group to decimal.
Example: Convert 0110 1000 0101 to Decimal
| 0110 | 6 |
| 1000 | 8 |
| 0101 | 5 |
| Result | 685 |
BCD vs Pure Binary
| Property | BCD | Pure Binary |
|---|---|---|
| Bits per digit | 4 bits per decimal digit | Minimum bits for range |
| Range (8 bits) | 0–99 (2 BCD digits) | 0–255 |
| Efficiency | Less efficient (some codes wasted) | More efficient |
| Decimal display | Easy (direct digit mapping) | Requires conversion |
| Arithmetic | Correction step needed | Straightforward |
| Used in | Calculators, 7-segment displays | Computers, processors |
BCD Addition
Add the two 4-bit BCD digits as binary. If the sum exceeds 9 (i.e., > 1001) or produces a carry, add 6 (0110) to correct.
Rule
Example 1: Add BCD 5 + 3
Example 2: Add BCD 7 + 8
Example 3: Add BCD 37 + 48
| Units: 0111 + 1000 = 1111 | > 9 → add 6 → 1 0101 |
| Tens: 0011 + 0100 + 1(carry) = 1000 | ≤ 9, no correction |
| Result | 1000 0101 = 85 in BCD ✓ |
Numerical Examples (GATE Level)
Q1: Convert decimal 396 to BCD.
Q2: What is 0111 1000 in BCD decimal?
Q3: Add BCD 59 + 47.
| Units: 1001 + 0111 = 10000 | carry + 0000 → add 6 → carry + 0110 |
| Actually: 9+7=16 | BCD: 0001 0110 (carry=1, digit=6) |
| Tens: 0101 + 0100 + 1 = 1010 | > 9 → add 6 → 10000 (carry=1, digit=0) |
| Hundreds | 0000 + 0001 (carry) = 0001 |
| Result | 0001 0000 0110 = 106 ✓ |
Advantages of BCD
- Easy conversion to/from decimal (used in calculators, displays)
- No conversion needed to drive 7-segment displays
- Avoids rounding errors in financial calculations
Disadvantages of BCD
- Less storage-efficient than pure binary (wastes 6 codes per digit)
- Arithmetic requires correction step
- Slower arithmetic circuits
Interview Questions
Q1: Why are codes 1010–1111 invalid in BCD? BCD maps each decimal digit (0–9) to a 4-bit code. Since decimal has only 10 digits, only 10 of the 16 possible 4-bit combinations are used. The remaining 6 combinations (1010–1111) have no decimal equivalent and are treated as invalid.
Q2: How many BCD digits are needed to represent decimal 999? Three BCD digits × 4 bits each = 12 bits. Pure binary only needs 10 bits (2^10 = 1024). BCD uses 20% more bits here.
Q3: What correction factor is added in BCD addition and why 6? When a sum exceeds 9, adding 6 (= 16 - 10) corrects for the fact that BCD skips 6 codes between 9 (1001) and the next decimal digit carry (10000). Adding 6 effectively performs the decimal carry correction.
Q4: Where is BCD practically used today? BCD is used in digital clocks/watches (seconds, minutes display), financial calculations (banking software to avoid floating-point errors), 7-segment display decoders (7447 IC), and ATM machines.
Q5: What is the difference between BCD and binary? Binary is a pure number system — 8 bits can represent 0–255. BCD is a coded representation — 8 bits represent only 0–99 (two decimal digits). BCD prioritizes decimal readability over storage efficiency.
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for BCD Code (8421) — Binary Coded Decimal Complete Guide.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Digital Electronics topic.
Search Terms
digital-electronics, digital electronics, digital, electronics, codes, bcd, code, bcd code (8421) — binary coded decimal complete guide
Related Digital Electronics Topics