GATE Computer ScienceVery hardGATE CS (PYQ pattern)
How many IEEE 754 single-precision numbers x satisfy 1 ≤ x < 1000?
- A. 83886080
- B. 83492865
- C. 83492864
- 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
- How many of the 2³² IEEE 754 single-precision bit patterns represent a finite value that is an integer (both zeros included, both signs…
- What is the smallest positive integer N such that N + 0.5 is NOT exactly representable in IEEE 754 single precision?
- Which of the following comparisons evaluate to true when done in IEEE 754 double-precision arithmetic (round to nearest even)? I. 0.1 +…
- A hypothetical 8-bit floating-point format follows IEEE 754 conventions: 1 sign bit, 4 exponent bits (bias 7), 3 fraction bits, with…
- An 8-bit floating-point format follows IEEE 754 conventions: 1 sign bit, 4 exponent bits (bias 7; field 15 reserved for ∞/NaN), 3 fraction…
- A floating-point format has a sign bit and 3 fraction bits (so 4 significant bits including the hidden 1), with round-to-nearest…