in Digital Logic edited by
16,534 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 )$
in Digital Logic edited by
by
16.5k views

4 Comments

edited by
Min val = 0.

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

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

8
8

Converting between Decimal and Binary:

0
0

9 Answers

123 votes
123 votes

hope this helps!!!!

4 Comments

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
3
3
Great explanation
1
1
why can’t we just put 0’s at fractional part in the representation
0
0
the easiest
0
0
107 votes
107 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
by

4 Comments

very clear and easy approach
1
1

@srestha

The n-bit fixed-point representation of an unsigned real number X uses f bits for the fraction part.

In the question itself they have given it as an unsigned real number.

0
0

Easy Method :-

Place the dot(.) to the extreme right so that after the dot only the insignificant zeros remain like $num.000$.

To do this we need to multiply the $n-bit$ no. with $2^{-f}$ .

Given it’s unsigned real number, and we know:-

The range of unsigned real no. of $n-bit$ is $0$ to $2^n-1$

So, just multiply  ($0$ to $2^n-1$) with $2^{-f}$ and we get Option D. 0 to $\left ( 2^{i} - 2^{-f} \right )$

3
3
24 votes
24 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
by

4 Comments

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

how -1 bit possible?
0
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
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
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 .
0
0
14 votes
14 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
Answer:

Related questions