edited by
17,924 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

Best answer
81 votes
81 votes
The maximum difference between two successive real numbers will occur at extremes. This is because numbers are represented up to mantissa bits and as the exponent grows larger, the difference gets multiplied by a larger value. (The minimum difference happens for the least positive exponent value).
Biasing will be done by adding $31$ as given in the question. So, actual value of exponent will be represented value $- 31.$ Also, we can not have exponent field as all $1$’s as given in question (usually taken for representing infinity, NAN etc). So, largest value that can be stored is $111110 = 62.$
Largest number will be $1.111111111 \times 2^{62-31} = \left(2 - 2^{-9}\right) \times 2^{31}$
Second largest number will be $1.111111110 \times 2^{62-31} = \left(2 - 2^{-8}\right) 2^{31}$
So, difference between these two numbers $=  \left(2 - 2^{-9}\right) \times 2^{31} - \left(2 - 2^{-8}\right) \times 2^{31}\\= 2^{31} \left[\left(2 - 2^{-9}\right) - \left(2 - 2^{-8}\right) \right] \\= 2^{31} \left[ 2^{-8} - 2^{-9} \right] \\= 2^{31} \times 2^{-9} = 2^{22}$

Correct Answer: C.
edited by
28 votes
28 votes

The gap between two succesive numbers is small towards the minimum value and maximu towards the maximum value.

Fist Maximum:

0(sign) 111110 (Biased Exponent) 111111111 mantissa

Second Maximum

0(sign) 111110 (Biased Exponent) 111111110 mantissa

E=62 that is biassed exponent since said not all 1's .

DIfference   = (1+1-2-9)*2E-31 - (1+1-2-8)*2E-31

                   =(2-2-9)*2E-31 - (2-2-8)*2E-31

                      = (2-2-9)*262-31 - (2-2-8)*262-31

                      =231 * [(2-2-9) - (2-2-8) ]

                    =222 should be the ans.

19 votes
19 votes

Exponent grows and makes no. larger, so we take adjacent values at extremes. Exponent have to be taken with all 1's except LSB as 0(as all 1's makes no. 0)

  Sign(1 bit) Exponent(6 bits) Mantissa(9 bits)
1st largest no 0=>+ve 111110=>(62)10 111111111=>(511)10
2nd large no 0=>+ve 111110=>(62)10 111111110=>(510)10

diff. = [(1+511*2-9)262-31]   -  [(1+510*2-9)262-31]
      = [1+ 511*2-9 - 1 - 510*2-9 ] 262-31
        =
[1* 2-9]  262-31 
        
= 2-9+62-31 = 222

edited by
8 votes
8 votes

largest value = 231+511.222

2nd largest value = 231+510.222

so largest difference between them = 222

C . $2^{22}$

Answer:

Related questions

27 votes
27 votes
5 answers
1
Kathleen asked Sep 16, 2014
10,314 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