edited by
3,449 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$
edited by

4 Answers

Best answer
2 votes
2 votes

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
1 votes
1 votes

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

Related questions

0 votes
0 votes
2 answers
2
Arjun asked Jan 2, 2019
1,946 views
The boolean expression $\overline{A} \cdot B + A \cdot \overline{B}+ A \cdot B$ is equivalenet to$\overline{A} \cdot B$$\overline{A+B}$$A \cdot B$$A+B$
0 votes
0 votes
1 answer
3
Arjun asked Jan 2, 2019
6,351 views
In computers, subtraction is generally carried out by$9$’s complement$1$’s complement$10$’s complement$2$’s complement