GATE Computer ScienceVery hardGATE CS (PYQ pattern)
0.1 stored in IEEE 754 single precision (round to nearest) has the bit pattern 0x3DCCCCCD. Relative to the exact value 0.1, the stored value is
- A. larger, by 0.2 ulp (1 ulp = 2⁻²⁷ here)
- B. smaller, by 0.2 ulp (1 ulp = 2⁻²⁷ here)
- C. larger, by 0.8 ulp (1 ulp = 2⁻²⁷ here)
- D. larger, by 0.2 ulp (1 ulp = 2⁻²³ here)
Correct answer: A. larger, by 0.2 ulp (1 ulp = 2⁻²⁷ here)
0.1 = 1.1001 1001 …₂ × 2⁻⁴, so 1 ulp = 2⁻⁴⁻²³ = 2⁻²⁷. The infinite fraction is 0x4CCCCC.CCC…, i.e. 0x4CCCCC + 0.8 ulp. Rounding to nearest goes up to 0x4CCCCD, adding 0.2 ulp, so the stored value exceeds 0.1 by 0.2 × 2⁻²⁷ ≈ 1.49 × 10⁻⁹.
More Digital Logic questions
- What is the IEEE 754 single-precision bit pattern of the value nearest to −1/3 (round to nearest)?
- Which of the following are true in IEEE 754 arithmetic (using the language operators ==, != and the usual semantics)? Let nan be a NaN and…
- An 8-bit floating-point format has 1 sign bit, 5 exponent bits (bias 15) and 2 fraction bits, with IEEE-style denormals and exponent field…
- An 8-bit floating-point format has 1 sign bit, 5 exponent bits (bias 15) and 2 fraction bits, with IEEE 754-style normalised numbers. How…
- A signed Q4.4 fixed-point format stores x as the integer round(16x) in 8 bits. Two values A = −1.4375 (integer −23) and B = 0.4375…
- The double-dabble algorithm converts the 8-bit binary number 10110111 (183) to BCD. Before each of the 8 shifts, every BCD digit that is 5…