Difficulty: Easy
Correct Answer: 6
Explanation:
Introduction / Context:
Choosing code length is a basic information theory and coding design task. For a fixed-length binary code, the number of representable symbols is 2^n for n bits. We must cover all distinct characters with the smallest n.
Given Data / Assumptions:
Concept / Approach:
Find the smallest integer n such that 2^n ≥ 46. Compute 2^5 = 32 and 2^6 = 64; therefore n = 6 satisfies the requirement, while n = 5 does not.
Step-by-Step Solution:
Verification / Alternative check:
Even if some codes remain unused (64 − 46 = 18), 6 bits is still minimal; 5 bits cannot encode all 46 characters.
Why Other Options Are Wrong:
Common Pitfalls:
Forgetting to include symbols, confusing variable-length with fixed-length codes, or assuming exact power-of-two sizes are mandatory.
Final Answer:
6
Discussion & Comments