GATE Computer ScienceHardGATE CS (PYQ pattern)

Values from −1000 to +1000 must be stored with a resolution of at least 0.0001. Design (i) is a two's complement binary fixed-point format (integer bits plus fraction bits, spacing a power of two). Design (ii) stores the exact count of ten-thousandths as a two's complement integer. What is the minimum total number of bits for each?

  1. A. 26 and 25
  2. B. 25 and 26
  3. C. 24 and 25
  4. D. 25 and 25

Correct answer: D. 25 and 25

(i) Spacing 2^−f ≤ 0.0001 needs f = 14 (2⁻¹³ ≈ 0.000122 is too coarse); the integer part including the sign needs 11 bits, since −1024 ≤ x < 1024 covers ±1000 (10 bits would stop at ±512): 25 bits. Adding a separate sign bit to 11 magnitude bits gives the 26 trap. (ii) The count runs from −10,000,000 to +10,000,000; 2²⁴ = 16,777,216 > 10⁷, so 25 bits (range ±2²⁴) suffice.

More Digital Logic questions

Exams that ask this topic