GATE Computer ScienceModerateGATE CS (PYQ pattern)

What is the IEEE 754 single-precision bit pattern of the value nearest to −1/3 (round to nearest)?

  1. A. 0xBEAAAAAA
  2. B. 0xBF2AAAAB
  3. C. 0x3EAAAAAB
  4. D. 0xBEAAAAAB

Correct answer: D. 0xBEAAAAAB

1/3 = 1.0101…₂ × 2⁻², so the biased exponent is 125 = 01111101. The 23 fraction bits are 0101…01 (alternating, ending in 1) and the discarded tail 0101… is more than half an ulp, so it rounds up to …1011: fraction 0x2AAAAB. Sign 1, exponent 01111101 → 0xBEAAAAAB. Truncation gives 0xBEAAAAAA.

More Digital Logic questions

Exams that ask this topic