edited by
17,925 views
65 votes
65 votes

The following is a scheme for floating point number representation using $16$ bits.

Let $s, e,$ and $m$ be the numbers represented in binary in the sign, exponent, and mantissa fields respectively. Then the floating point number represented is:

$$\begin{cases}(-1)^s \left(1+m \times 2^{-9}\right) 2^{e-31}, & \text{ if the exponent } \neq 111111 \\  0, & \text{ otherwise} \end{cases}$$

What is the maximum difference between two successive real numbers representable in this system?

  1. $2^{-40}$
  2. $2^{-9}$
  3. $2^{22}$
  4. $2^{31}$
edited by

9 Answers

8 votes
8 votes

Largest positive number m all 1's exponent=111110=62

Second largest number m 111111110 exponent=111110=62 

Difference=231(2-29-2+2-8)=231*2-9=222

1 votes
1 votes
I had confusions in interpretation of above solution. So this might help you.

111111111 can be written as $2^{10}-1$

So Largest No. 1.111111111 x $2^{31}$ equivalent to  ($2^{10}-1$) x $2^{-9}$ x $2^{31}$
Second largest No. 1.111111110 x $2^{31}$ equivalent to  ($2^{10}-2$) x $2^{-9}$ x $2^{31}$
difference of above equation:
= [($2^{10}-1$) x $2^{-9}$ x $2^{31}$ ] - [($2^{10}-2$) x $2^{-9}$ x $2^{31}$]
= $2^{22}$
1 votes
1 votes

in floating point representation as we move AWAY from zero, numbers are sparsely spaced. This means the largest difference between 2 successive numbers will be at the VERY ends.
For better explanation → https://youtu.be/4_cbc9Q7b8c 
we can check the right end (+ve side) or left end (-ve side). 
If we go with the +ve side →
the right most numbers will be for exponent 111111 but we cannot choose these because ALL numbers with this exponent have to be considered 0 (according to question)
so max under this exponent → 0 111111 111111111 [is actually zero] 
and 2nd max under this exponent → 0 111111 111111110 [is actually zero]
DIFF = 0 → Therefore DON’T take 111111

What is the next maximum exponent → 111110
so max number under this exponent → 0 111110 111111111 = $(2^{10}-1) * 2^{-22}$
and 2nd max number under this exponent → 0 111110 111111110 = $(2^{10}-2)* 2^{-22}$
DIFF = $2^{22}$

NOTE : as long as we are under exponenet 111110 we can take any 2 successive numbers and result will be same

Answer:

Related questions

27 votes
27 votes
5 answers
1
Kathleen asked Sep 16, 2014
10,319 views
Assuming all numbers are in $2’s$ complement representation, which of the following numbers is divisible by $11111011$?$11100111$$11100100$$11010111$$11011011$
29 votes
29 votes
1 answer
4