GATE Computer ScienceVery hardGATE CS (PYQ pattern)
In IEEE 754 single precision with round-to-nearest, ties-to-even, what is the smallest positive single-precision number x for which the computed 1.0f + x is greater than 1.0f?
- A. 2⁻²³
- B. 2⁻²⁴
- C. 2⁻²⁴ + 2⁻⁴⁷
- D. 2⁻²⁴ + 2⁻⁴⁸
Correct answer: C. 2⁻²⁴ + 2⁻⁴⁷
Just above 1 the spacing is 2⁻²³, so 1 + x rounds up only if x exceeds half an ulp, 2⁻²⁴. x = 2⁻²⁴ is an exact tie and rounds to the even neighbour 1.0. The next float above 2⁻²⁴ is 2⁻²⁴(1 + 2⁻²³) = 2⁻²⁴ + 2⁻⁴⁷, which rounds up. 2⁻²⁴ + 2⁻⁴⁸ would need 25 significant bits, so it is not a single-precision number; 2⁻²³ is machine epsilon, not the smallest such x.
More Digital Logic questions
- The partial products of an 8 × 8 unsigned multiplier (one AND gate per bit pair) are reduced by a Dadda tree, whose stage height limits…
- A mod-60 counter is built in three ways: (i) a single binary counter reset at 60, (ii) a mod-6 binary counter cascaded with a BCD (mod-10)…
- A serial detector outputs 1 whenever the last four input bits are 1101 or 1011 (overlapping occurrences count). What are the minimum…
- For how many of the 256 eight-bit patterns x does the 8-bit two's complement negation −x (= x' + 1, carry out discarded) contain exactly…
- A designer has 6 check bits per word. What is the largest number of data bits that can be protected by (i) a single-error-correcting…
- Among the C(16,4) = 1820 four-variable Boolean functions with exactly four minterms, how many have a minimal sum-of-products with exactly…