COA
BCD (Binary Coded Decimal)
Definition:
BCD is a numeric representation
where each decimal digit (0–9)
is represented separately in binary form
(4 bits).
Examples:
·
Decimal 5
→ 0101
(in BCD)
·
Decimal 27
→
o 2
→ 0010
o 7
→ 0111
o So,
0010 0111
·
Decimal 93
→
o 9
→ 1001
o 3
→ 0011
o So,
1001 0011
Types
of BCD:
1.
8421 BCD (most
common) – weights are 8,4,2,1
Example: 7 → 0111 (4+2+1=7)
Advantages
of BCD:
·
Easy conversion between decimal and binary.
·
Useful in financial/decimal calculations (ATM,
calculators).
Disadvantages
of BCD:
·
Takes more
storage than pure binary.
(e.g., Decimal 99 = 2 digits → needs 8 bits in BCD, but only 7 bits in binary).
·
Arithmetic is more complex.
✅ Quick
Summary:
·
Floating
Point → Used for real numbers, fractions, scientific calculations.
·
BCD
→ Used for exact decimal digit storage (financial applications).
Comments
Post a Comment