Difficulty: Easy
Correct Answer: 12 BCD, 10 binary
Explanation:
Introduction / Context:
This question checks understanding of how many bits are needed to encode a given decimal value using two different schemes: BCD, which codes each decimal digit separately, and straight binary, which represents the entire value in base 2 using the minimum number of bits.
Given Data / Assumptions:
Concept / Approach:
For BCD, count decimal digits and multiply by 4. For straight binary, locate the smallest power of two strictly greater than the number, then take the exponent as the bit count. If 2^N is equal to the number, N bits suffice; otherwise still N bits when 2^(N-1) <= value < 2^N.
Step-by-Step Solution:
1) 643 has three digits, so BCD bits = 3 * 4 = 12.2) Check powers of two: 2^9 = 512, 2^10 = 1024.3) Since 512 <= 643 < 1024, 10 bits are required in straight binary.4) Therefore the pair is 12 BCD, 10 binary.
Verification / Alternative check:
Encoding 643 in binary gives 1010000011, which indeed fits in 10 bits. BCD digits 6, 4, 3 encode as 0110 0100 0011, which is 12 bits total.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing 2^N thresholds, or assuming BCD packs digits more tightly than 4 bits per digit.
Final Answer:
12 BCD, 10 binary
Discussion & Comments