Bit-width sizing: what is the minimum number of binary bits required to represent 748 distinct integer values (i.e., to uniquely encode the numbers 0 up to some maximum at least 748 − 1)?

Difficulty: Medium

Correct Answer: 10

Explanation:


Introduction / Context:
Determining the required bit width for a counter, address space, or identifier is an everyday design decision. Using too few bits causes overflow; too many wastes resources. The key is relating the count of representable states to powers of two.


Given Data / Assumptions:

  • We must represent 748 different numbers (states).
  • n bits represent 2^n distinct patterns.
  • We seek the smallest n such that 2^n ≥ 748.


Concept / Approach:
Find successive powers of two until the count meets or exceeds the required number of states. This is equivalent to computing the ceiling of log2(748).


Step-by-Step Solution:
Compute nearby powers: 2^8 = 256, 2^9 = 512, 2^10 = 1024.Compare to requirement: 512 < 748 ≤ 1024.Therefore, 9 bits are insufficient, but 10 bits suffice.Minimum bit-width = 10 bits.


Verification / Alternative check:
Using logarithms: log2(748) ≈ ln(748)/ln(2) ≈ 6.619/0.693 ≈ 9.55. Taking the ceiling gives 10. This matches the power-of-two comparison method.



Why Other Options Are Wrong:

  • 7 or 8 bits yield at most 128 or 256 states, far below 748.
  • 9 bits yield 512 states, still short of 748.


Common Pitfalls:

  • Off-by-one errors—confusing “numbers” with “maximum representable value.” For 748 distinct values, we require ≥748 states.
  • Assuming decimal groups (e.g., thousands) map neatly to binary bit counts; always check powers of two.


Final Answer:
10

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion