search
Log In
48 votes
7.3k views

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 )$
in Digital Logic
edited by
7.3k views
1
I think answer is D
0

to know more about the fixed representation refer https://en.wikipedia.org/wiki/Q_(number_format)

4
Min val = 0.

Max val = $2^{i}-1$+$\frac{2^{f}-1}{2^{f}}$ = $2^{i}$  $-$ $2^{-f}$.
3

Important keyword in the question is the number representation is fixed point, unlike the mindset a student may have of floating point.

i ---> represent integer part of a number

f --> represent fractional part

Say X = 21.75

i is 21 and f is 75

since unsigned number range will start from 0 (zero)

to (2^i -1)+ (1- (2^-f))

0

Converting between Decimal and Binary:

9 Answers

79 votes

Unsigned real number $x.$

Let $n=5, f=2, i = 5-2 = 3.$

1. Minimum value of $x:$

Value on decimal $ = 0.$

2. Maximum value of $x:$

Value on decimal $ = 2^3 - 2^{-2} = 8 - 0.25 = 7.75$ $($Or $2^2+2^1+2^0 + 2^{-1}+2^{-2} = 7.75)$

So (D) is the answer.


edited by
2
good :)

but how do u confirm it is a unsigned real no?
6
good job!!!..the question after reading .. i thought i know nothing... then after reading all other explanation made me felt .. OHH MY goshh... was this even in  our syllabus too?...

thenn........,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, after going through ur explaination .. i was like ,.. wow. how simple was that..

thanks a lot..^_^.
0
Really nice explanation. Thnak you
0
@srestha mam it is clear from given options
0
very clear and easy approach
70 votes

hope this helps!!!!

0
This is better and more generalized explanation... We cant depend in gate by testing inputs in option.. this is why this is better than tagged answer
0
Great explanation
19 votes

A number format representation, where the numbers are unsigned and where we have integer bits $i$ (on the LHS of the decimal point) and $f$ fractional bits (on the RHS of the decimal point) is known as $U(i,f)$ fixed-point format .

Hence, for unsigned number $U(i,f)$, the total bit length is $N = i + f$ .

Ex :-

  • $U(8,8)$ can be written as $00000011.10000010$ .
  • $U(6,2)$ can be written as $000100.10$ .

Now, using the unsigned number range of $N$ - bit word, the range $R$ of unsigned fixed point number can be written as $\frac{0\leq R\leq 2^{N}-1}{2^f}$ OR, $0\leq R\leq 2^{i}- 2^{-f}$ .



Similarly, A number format representation, where the numbers are signed and where we have integer bits $i$ (on the LHS of the decimal point) and $f$ fractional bits (on the RHS of the decimal point) is known as $U(i,f)$ fixed-point format .

Hence, here we have $1$ sign bit, $i$ integer bits and $f$ fractional bits, so total length of $N$- bit word = $1+i+f$ .

Ex :-

  • $A(7,8)$ can be written as $1 0000001.00000000$ = $-127$ , etc. 

 Now, using the signed number range ( 2's complement ) of $N$ - bit word, the range $R$ of signed fixed point number can be written as $\frac{-2^{N-1} \leq R \leq +(2^{N-1}-1)}{2^f}$ OR $-2^{i}\leq R\leq 2^{i}-2^{-f}$ .


edited by
0
cannot understand how U(-1,16) is 15?

how -1 bit possible?
0
@Srestha

The number will have $16$ bits and range being $0$ to $2^{-1} - 2^{-17}$ and then take any $16$ bit number from the given range. Finally divide by $2^{17}$ .
0

@Kapil

According to ur assumption , U(i,f) where i is number of bits in integer part.

So, can number of bits i=-1?

0
@Srestha

Nothing is there on the LHS . As range is from $0$ to $0.49991234$ something .

Also, this negative notation is only used when we deal with numbers from 0 to 0.something .
12 votes

answer asks the lower bound of decimal number.

now of any number lower bound is 0

we are left with 2 options

c says 2 but with i bit we can represent number upto 2i-1

so it will be 2i-2-f

so D is correct answer here


edited by
7 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
0

DOUBTS :
Question doesnt mention the number being decimal its fixed point representation of unsigned real number !!
real number can be negative but as its unsigned we need to rule out negative

0
question does mention the range of decimal
5 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/

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
0 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

Answer:

Related questions

14 votes
4 answers
1
4.1k views
Consider the unsigned 8-bit fixed point binary number representation, below, $b_7 \: \: b_6 \: \: b_5 \: \: b_4 \: \: b_3 \: \: \cdot b_2 \: \: b_1 \: \: b_0$ where the position of the primary point is between $b_3$ and $b_2$ . Assume ... be exactly represented Only $ii$ cannot be exactly represented Only $iii$ and $iv$ cannot be exactly represented Only $i$ and $ii$ cannot be exactly represented
asked Feb 14, 2018 in Digital Logic gatecse 4.1k views
31 votes
6 answers
2
5.9k views
When two 8-bit numbers $A_{7}...A_{0}$ and $B_{7}...B_{0}$ in 2's complement representation (with $A_{0}$ and $B_{0}$ as the least significant bits) are added using a ripple-carry adder, the sum bits obtained are $S_{7}...S_{0}$ and the carry bits are $C_{7}...C_{0}$. An overflow is said to ... $\left ( A_{0}.B_{0}.\bar{S_{0}}+\bar{A_{0}}.\bar{B_{0}}.S_{0} \right )$ is 1
asked Feb 14, 2017 in Digital Logic Arjun 5.9k views
24 votes
7 answers
3
5.2k views
Consider a combination of T and D flip-flops connected as shown below. The output of the D flip-flop is connected to the input of the T flip-flop and the output of the T flip-flop is connected to the input of the D flip-flop. Initially, both $Q_{0}$ and $Q_{1}$ ... 00 and after the 4th cycle are 11 respectively. $Q_{1}Q_{0}$ after the 3rd cycle are 01 and after the 4th cycle are 01 respectively.
asked Feb 14, 2017 in Digital Logic Arjun 5.2k views
...