The minimum number of bits required to store any three-digit decimal number is:
2012
The minimum number of bits required to store any three-digit decimal number is:
Answer: D. 10 — ConceptAn unsigned binary field with b bits has 2b distinct patterns and represents values from 0 through 2b − 1. Therefore, the minimum width for a largest…
- A.
3
- B.
5
- C.
8
- D.
10
Attempted by 40 students.
Show answer & explanation
Correct answer: D
Concept
An unsigned binary field with b bits has 2b distinct patterns and represents values from 0 through 2b − 1.
Therefore, the minimum width for a largest required value M is the smallest integer b for which 2b − 1 ≥ M.
Application
A three-digit decimal number can be as large as 999, so the storage width must include 999.
With 9 bits, the largest unsigned value is 29 − 1 = 511; the range ends before 999.
With 10 bits, the largest unsigned value is 210 − 1 = 1023; the range includes 999.
Cross-check
Equivalently, 29 = 512 < 1000 ≤ 1024 = 210, so ⌈log2(1000)⌉ = 10.
Result
Thus the minimum required width is 10 bits.