The Gateway to Computer Science Excellence
+2 votes
104 views

In IEEE 754 single floating point format, how many numbers can be represented in the interval [10, 16)?

      A. 2^{21}

      B. 3 x 2^21

      C. 5 X 2^21

      D. 2^22

in CO and Architecture by (179 points) | 104 views

1 Answer

+2 votes
In the IEEE 754 notation , the number is represented in 32 bits . The first bit is for the sign of the number , next 23 bits is normalise mantissa and next 8 bits is biased exponent.

10 is represented as = $1.01*2^{3} = 1.01*2^{130-127}$ , which in 32 bit format would be represented as ,

$001(19 \ 0's)10000010$.

And 16 is represented as $1.0*2^4 = 1.0*2^{131-127}=0(23 \ 0's)10000011$.

Thus we need to find the number of possible patterns of 0's and 1's in the following format.

Keeping the exponent same , the number of patterns of mantissa of the form $01(21 \ x's)$ and $1(22 \ x's)$.Where $x's$ are the positions to fill with 0's and 1's .

Thus total number of possible patterns = $2^{21}(of \ the \ 1^{st} \ kind)+2^{22}(of \ the \ 2^{nd} \ kind)$ = $3*2^{21}(Ans)$.
by Loyal (5.8k points)
0
Why you are taking 1(22 x's) ? It should not be 2^23 as we have complete 23 zeros to select from?
0
1.00000...000 x 2^3 is  how much?

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,644 questions
56,505 answers
195,555 comments
101,052 users