GATE Computer ScienceVery hardGATE CS (PYQ pattern)

How many IEEE 754 single-precision numbers x satisfy 1 ≤ x < 1000?

  1. A. 83886080
  2. B. 83492865
  3. C. 83492864
  4. D. 79495168

Correct answer: C. 83492864

Each binade [2^e, 2^(e+1)) holds 2²³ floats. [1, 512) is 9 full binades: 9 × 2²³. In [512, 1024) the spacing is 2^(9−23) = 2⁻¹⁴, so [512, 1000) holds (1000 − 512) × 2¹⁴ = 488 × 16384. Total 9 × 8388608 + 7995392 = 83492864 (= 0x447A0000 − 0x3F800000, since positive floats are ordered like their bit patterns).

More Digital Logic questions

Exams that ask this topic