Question

The nn-bit fixed-point representation of an unsigned real number XX uses ff bits for the fraction part. Let i=n−fi = n - f. The range of decimal values for XX in this representation is

Choose one option
Official answer and solution
Official answer
D
From
Official GATE 2017 answer key

Solution

Determine the minimum and maximum representable decimal values for an nn-bit unsigned fixed-point representation with ii integer bits and ff fractional bits.

In an nn-bit unsigned fixed-point format with ii integer bits and ff fractional bits (n=i+fn = i + f), the weight of each bit position kk from k=−fk = -f to i−1i - 1 is 2k2^k.

The minimum value occurs when all nn bits are 0:

Xmin⁡=0X_{\min} = 0

The maximum value occurs when all nn bits are 1:

Xmax⁡=∑k=−fi−12k=2−f∑j=0i+f−12j=2−f(2i+f−1)=2i−2−fX_{\max} = \sum_{k=-f}^{i-1} 2^k = 2^{-f} \sum_{j=0}^{i+f-1} 2^j = 2^{-f} (2^{i+f} - 1) = 2^i - 2^{-f}

Thus, the range of decimal values for XX is 00 to (2i−2−f)(2^i - 2^{-f}).

Final answer

D

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2017 Computer Science and Information Technology (CS) Session 1
Question
7 of 65, printed as CS Q.7
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.