in Digital Logic edited by
3,501 views
2 votes
2 votes

The decimal floating point number $-40.1$ represented using $\textsf{IEEE-754} \: 32$-bit representation and written in hexadecimal form is

  1. $\textsf{0x}C2206666$
  2. $\textsf{0x}C2206000$
  3. $\textsf{0x}C2006666$
  4. $\textsf{0x}C2006000$
in Digital Logic edited by
by
3.5k views

4 Comments

3.
0
0
I also got 3 )
0
0
should be A.
1
1

One can take help from this example also. 

Example is ok for -176.375 but for -40.1 still I am unable to find it.

0
0

4 Answers

2 votes
2 votes
Best answer

IEEE 754, 32 bit representation,  1 bit for sign, 8 bits for Exponent and 23 bits for mantissa

Note that Exponent represented in Excess-127 format.

We have to represent -40.1, So

sign bit = 1

40 = 32+8 = (101000)$_2$

0.1 = (00011 0011 0011 0011 0011 00)$_2$ .......... represented with 23 bits

40.1 = 101000 . 00011 0011 0011 0011 0011 00    ----------------- in binary form.

       = 1 . 01000 00011 0011 0011 0011 0011 00 * 2$^5$ ----- NOW it is in 1.M format, Keep only 23 bits in Mantissa

       = 1 . 01000 00011 0011 0011 0011 0 * 2$^5$ ----- NOW it is in 1.M format, and Mantissa have 23 bits only.

True exponent is 5 ( which is in power of 2) ==> Excess Exponent value = 5+127 = 132 = 128 + 4 = 10000100

total representation is like:

sign Exponent Mantissa
1 10000100 01000000110011001100110

Finally it is like (11000010001000000110011001100110)$_2$

1100 0010 0010 0000 0110 0110 0110 0110 ==> 0xC2206666

edited by

4 Comments

This is wrong answer. It should be 0x 2206666, option A is correct

0
0
did you mean, the solution is wrong ? or last line missing 6 ?
0
0
just the last 6 is missing, else everything is fine
0
0
then it's typing mistake but not "wrong answer".
0
0
3 votes
3 votes

Option A is right.

edited by
1 vote
1 vote

Option 3. 0xC2206666 right

1 vote
1 vote

Given $-(40.1)$, convert it into binary we get

$(00101000.0001101100110011001100..)$

IEEE $754$ notation which will be used is:

$V= (-1)^{S} * (1.M) * 2^{E-127}$ where $S$ is sign bit, $M$ is mantissa and $E$ is exponent

Converting our given number into the above format we get

$1.010000001100110011.... *2^{5}$, we know sign take 1 bit, exponent 8 and mantissa 23 bit 

$E$-127=$5$, $E$= $132$($10000100$)

SEM: $11000010001000000110011001100110$

Convert into hexadecimal:

$1100 0010 0010 0000 0110 0110 0110 0110$

$C2206666$

Option d) is correct

3 Comments

Absolutely correct sir ! Thank you.

I was doing it wrong for recursive binary conversion of .1 , actually I was stopping it till non recursive part and then put zeros.

I forgot that it could repeat it's value till we have exhausted our mantissa limit.
0
0
Yes u r also correct
0
0
Option D is correct
0
0

Related questions