# GATE2017-2-12

8.6k views

Given the following binary number in $32$-bit (single precision) $IEEE-754$ format :

$\large 00111110011011010000000000000000$

The decimal value closest to this floating-point number is :

1. $1.45*10^1$
2. $1.45*10^{-1}$
3. $2.27*10^{-1}$
4. $2.27*10^1$

edited
1
0
Nothing is visible.
0
binary no. given is more than 32 bit....seems there is some toping error...plz correct it.
0
@Shaik Masthan can you explain how mantisa explore here ???
0
$\text{Exponent - 01111100 = 124}$

$\text{True exponent = 124 - 127 = -3}$

$\text{So in normalized form it will be}$

$\text{= 1.1101101 *$2^{-3}$}$

$\text{= 0.237}$

$\text{= 2.37 *$10^{-1} \approx 2.27 * 2^{-1}$}$

In $32$ bit (single precision) IEEE-754 format, binary number is represented as

$S$($1$ bit) $E$($8$ bit) $M$($23$ bits) with implicit normalization and exponent is represented with Excess-127 code.

Here, Sign $bit =$ $0$ $\Rightarrow$ Number is positive.

Exponent bits $= 01111100 = 124$ $\Rightarrow$ $E = 124 - 127 = -3$ (Excess-127)

Mantissa bits $= 11011010000000000000000$ $\Rightarrow$ Number = $1.1101101$  (Implicit normalization).

$\therefore$ Number $= 1.1101101 * 2$$^{-3} = 0.0011101101 = 0.227 = 2.27 x 10$$^{-1}$

$\therefore$ Answer should be C.

edited
1
0.0011101101101 = 0.227 how? I am getting  .116 :(
0

Do it again or you can always use this converter.

1
ya my mistake .. the same I did at exam and now at home too . :(
1

How come Mantissa bits = 11011011010000000000000000 ??

Bold part is not in question. It is 110 110 1

0
Edited. :)
14

i am getting 0.231 when converted to decimal ryt?

even in the converter link mentioned there also

Have u chosen the nearest answer?

4
Yes, always choose the nearest answer.
3
11101101 =237.,how 227 ?
0

The exponent is being calculated using normal biasing not excess biasing.

Because in normal bias we subtract the Biased bits with $2^{n-1}-1$ , where n = no. of bits for biased exponent

& in excess bias we subtract the Biased bits with $2^{n}/2$  , where n = no. of bits for biased exponent

So here we are doing Actual Exponent =Biased Exponent -  [ $2^{8-1}-1$ ] = 124 - 127 = -3

so total 32 bit representation in which 1 bit is for sign, 8 bit for biased exponent, 23 bit for mantissa.

biased exponent part:01111100 =124 in decimal

mantissa part:11011010000000000000000=$\frac{1}{2}+\frac{1}{4}+\frac{1}{16}+\frac{1}{32}+\frac{1}{128}$

bias=$2^{n-1}-1$   where n=8 so biase=127

value=1.M*$2^{124-127}$

put all values you get closest ans C

Important: The mistake to avoid here is to avoid the premature conversion of binary numbers to decimal digits.

Use: $-1^{S}*1.M*2^{e-127}$

You'll get $1.1101101 * 2^{-3}$

Now, don't convert 1.1101101 to decimal just yet. Get the whole value, then do the base conversion.

=> $0.0011101101$

=> $\frac{1}{8} + \frac{1}{16} + \frac{1}{32} + \frac{1}{128} + \frac{1}{256} + \frac{1}{1024}$

I'll now ignore the last two terms, since they're really small.

=>$0.125+0.0625+0.03125+0.0078125$

=> $0.2265625$

=> $2.26 * 10^{-1}$

Option C

0
Yup.
After omitting the terms $\frac{1}{256}+\frac{1}{1024}$, the answer gets closer to the option stated in the question.

$1.1101101*2^{^{-3}}$ we convert it to 0.0011101101 (How?)

Remember that for Binary multiplication we increase number of bit by shifting decimal point to right and for Binary division we decrease number of bits by shifting decimal point to left.

To get the fractional value assume we are given number as 11101101 ignoring 0's coming before first 1 but after decimal point.

now calculate decimal value of 11101101 which is 237. now divide it by $2^{^{N}}$ where N is number of bit after decimal point
(of course we will count number of bits till only right most 1). Here  N is 10. so $\frac{237}{2^{^{10}}}= 0.231445$ or 2.31*$10^{^{-1}}$. but since it is not given and also we are asked to give closest value which is 2.27*$10^{^{-1}}$.

you might have wondering how this is producing same result. well there is no some trick. In fact you will get same $\frac{237}{1024}$ if you just add the p/q forms.

$\frac{1}{8}+\frac{1}{16}+\frac{1}{32}+\frac{1}{128}+\frac{1}{256}+\frac{1}{1024}=\frac{237}{1024}$

i just found first method much easier rather than calculating fractional value separately of each term and then adding them all. Let me know if it helps.

edited
0
Same I also thinking that I learn in compiler design std

## Related questions

1
578 views
Consider the following bit pattern represents the floating point number in IEEE 754 single precision format: 1 10000111 11100000000000000000000 Which of the following represents the decimal value of above floating number? A) -192 B) -320 C) -384 D) -448
What is the decimal value of the floating-point number $C1D00000$ (hexadecimal notation)? (Assume $32$-bit, single precision floating point $\text{IEEE}$ representation) $28$ $-15$ $-26$ $-28$
Which of the given number has its $\text{IEEE - 754}$ $32$-bit floating point representation as $\text{(0 10000000 110 0000 0000 0000 0000 0000)}$ $2.5$ $3.0$ $3.5$ $4.5$