GATE Computer ScienceModerateGATE CS (PYQ pattern)
What is the smallest positive integer N such that N + 0.5 is NOT exactly representable in IEEE 754 single precision?
- A. 16777216
- B. 4194304
- C. 8388607
- D. 8388608
Correct answer: D. 8388608
In [2^k, 2^(k+1)) single precision has spacing 2^(k−23). Spacing 0.5 holds up to k = 22, i.e. below 2²³ = 8388608, so 8388607.5 is still exact. From 2²³ the spacing is 1, so 8388608.5 is not representable. 2²⁴ is the integer limit, not the half-integer one.
More Digital Logic questions
- 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…
- A binary floating-point format keeps 4 significant bits (1 hidden + 3 stored fraction bits) with a wide exponent range and…
- For an 8-bit signed integer x (−128 to 127), x >> 2 is an arithmetic right shift (sign bit replicated) and x / 4 is division truncated…