GATE Computer ScienceHardGATE CS (PYQ pattern)

A hypothetical 8-bit floating-point format follows IEEE 754 conventions: 1 sign bit, 4 exponent bits (bias 7), 3 fraction bits, with denormals, ±0, ±∞ and NaNs. How many distinct finite real values can it represent (treating +0 and −0 as one value)?

  1. A. 240
  2. B. 238
  3. C. 239
  4. D. 254

Correct answer: C. 239

Exponent field 1 to 14 gives normal numbers: 14 × 8 = 112 magnitudes; field 0 gives 7 non-zero denormals; so 119 non-zero magnitudes, i.e. 238 non-zero values with both signs, plus one zero: 239. Exponent field 15 is reserved for ∞ and NaN.

More Digital Logic questions

Exams that ask this topic