The Gateway to Computer Science Excellence
+27 votes
8.4k 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$
in Digital Logic by
edited by | 8.4k views
+1
C is the answer.
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}$}$

4 Answers

+33 votes
Best answer

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.

by
edited by
+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

@Kantikumar 

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

+8 votes
in this qestion they are asking about IEEE 754

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
by
+7 votes

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 

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

$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.

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

But both producing different answer
Answer:

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
52,345 questions
60,522 answers
201,951 comments
95,372 users