recategorized by
2,072 views
7 votes
7 votes
In IEEE $754$ single floating point format, how many numbers can be represented in the interval [10, 16)?

      A. $2^{21}$

      B. $3 * 2^{21}$

      C. $5 * 2^{21}$

      D. $2^{22}$
recategorized by

3 Answers

5 votes
5 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)$.
edited by
4 votes
4 votes
First write 10 and 16 in single precision floating point representation

10=0  10000010  01000000000000000000000

16=0  10000011  00000000000000000000000

Now lets traverse through all the numbers in between. Matissa of 10:  01000000000000000000000 to 01111111111111111111111 has  $2^{21}$ numbers. Then

100000000000000000000000 to 11111111111111111111111 has $2^{22}$ numbers. The next number after this will be nothing but 16. So total $2^{21}$+$2^{22}$=3*$2^{21}$ numbers are there.
edited by
0 votes
0 votes

NOTE: the numbers that have to be represented here have to be in the de-normalized form i.e. there is just 1 significant bit  and its 0. The representation should be of the form “0. something something…..” Thus option C is correct

Related questions

5 votes
5 votes
0 answers
1
Manu Thakur asked Jan 14, 2018
1,153 views
Can someone please validate if the given range is correct, and we can keep all 0's in Mantissa unlike biased exponent.
2 votes
2 votes
2 answers
4
hemantsoni asked May 5, 2016
6,169 views
Which of the given number has its IEEE-754 32-bit floating-point representation as $(0 \ 10000000\ 110 0000 0000 0000 0000 0000)$a) 2.5b) 3.0c) 3.5d) 4.5