edited by
16,470 views
65 votes
65 votes

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. $2^{-f}$ to $2^{i}$
  2. $2^{-f}$ to $\left ( 2^{i} - 2^{-f} \right )$
  3. 0 to $2^{i}$
  4. 0 to $\left ( 2^{i} - 2^{-f} \right )$
edited by

9 Answers

8 votes
8 votes

Here we know that for any decimal number fixed point lowest bound is 0 alwyas .now we are left with option c and D

now for option c it is wrong. why?

question says:

the range of DECIMAL number

for n bit number we can represent decimal number upto 2n-1... but here it is 2n which can not be

so we can represent upto2i-2-f

so D is correct answer here

edited by
6 votes
6 votes

Answer: (D) 

Explanation: Since given number is in unsigned bit representation, its decimal value starts with 0. 
We have i bit in integral part so maximum value will be 2i 
Thus integral value will be from 0 to 2i – 1
We know fraction part of binary representation are calculated as (1/0)*2-f 
Thus with f bit maximum number possible = sum of GP series with a = 1/2 and r = 1/2

Thus fmax = {1/2(1 – (1/2)
f}/(1 – 1/2) = 1 – 2-f Thus maximum fractional value possible = 2i – 1 + (1 – 2-f ) = 2i - 2-f

http://www.geeksforgeeks.org/gate-gate-cs-2017-set-1-question-32/

1 votes
1 votes

Unsigned real number X. Lowest number representable should be 0, nothing stops it from being 0, and restrict it to 0.00043 or something. Hence, A and B eliminated.

Max number representable $2^{i}$ just looks wrong. What about the bits in f, they'd add up, too. So, C eliminated.

Option D seems reasonable.

Solved it under 30 seconds.


A proper solution would be to take small values of n, i and f; first put all 0's (for lower limit) then put all 1's (for upper limit). Then do option elimination.


 

Option D

0 votes
0 votes

In the fixed point representation, decimal value is fixed somewhere. In this question it is fixed after
i bits of MSB. So the min number that can be represented in this representation i=0000....,
f=00000... so min=0. and the max. number that can be represented i=111111...., f=111111....

edited by
Answer:

Related questions

39 votes
39 votes
6 answers
2
Arjun asked Feb 14, 2017
13,573 views
When two $8\text{-bit}$ numbers $A_{7}\cdots A_{0}$ and $B_{7}\cdots B_{0}$ in $2$'s complement representation (with $A_{0}$ and $B_{0}$ as the least significant bits) ar...