The n-bit fixed-point representation of an unsigned real number \(X\)uses…

2017

The n-bit fixed-point representation of an unsigned real number \(X\)uses \(f\) bits for the fraction part. Let \(i = n-f\). The range of decimal values for \(X\) in this representation is

  1. A.

    \(2^{-f} to \ 2^i\)

  2. B.

    \(2^{-f} to \ \left ( 2^{i} - 2^{-f} \right )\)

  3. C.

    0 to \(2^i\)

  4. D.

    \(0 \ to \ \left ( 2^{i} - 2^{-f} \right )\)

Attempted by 702 students.

Show answer & explanation

Correct answer: D

Answer: 0 to (2^i - 2^{-f}).

  • Interpretation: An n-bit unsigned fixed-point number uses f bits for the fractional part and i = n - f bits for the integer part.

  • Minimum value: When all bits are zero the value is 0.

  • Maximum value: When all bits are one, the integer part equals 2^i - 1 and the fractional part equals 1 - 2^{-f}. Summing gives (2^i - 1) + (1 - 2^{-f}) = 2^i - 2^{-f}.

  • Therefore the representable range is 0 to (2^i - 2^{-f}).

  • Example: For n = 8 and f = 4, i = 4 and the maximum is 2^4 - 2^{-4} = 16 - 1/16 = 15.9375, so the range is 0 to 15.9375.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir