GATE Computer ScienceEasyGATE CS (PYQ pattern)

How many of the numbers 0.05, 0.25, 0.3125, 0.6, 0.71875 and 0.9375 can be stored exactly in an unsigned fixed-point format with 4 fraction bits?

  1. A. 4
  2. B. 2
  3. C. 3
  4. D. 5

Correct answer: C. 3

Exact with 4 fraction bits means 16x is an integer. 0.25 = 4/16, 0.3125 = 5/16 and 0.9375 = 15/16 qualify. 0.71875 = 23/32 needs 5 bits; 0.05 and 0.6 have a factor 5 in the denominator and never terminate in binary. Count 3.

More Digital Logic questions

Exams that ask this topic