Represent the number (-26.5)10 as a floating point binary number with 24 bits. The normalized fraction mantissa has 16 bits and the exponent has 8 bits 5m Dec2005

By | November 6, 2014

Represent the number (-26.5)10 as a floating point binary number with 24 bits. The normalized fraction mantissa has 16 bits and the exponent has 8 bits. Make and state suitable assumptions, if any 5m Dec2005

First of all draw the 24 bits precision representations

precision_24bits

 S stands for Sign (white color)

E stands for Exponent (yellow color)

N stands for Number (also called Mantissa or Significand) (green color)

Then to represent we have (-26.5)10 using 24 bits precision representations

Since number is a negative number

Sign bit is: 1

1

Now let’s work on Mantissa part

Convert 26 into binary form i.e 11010

Remaining is fraction part 0.5

Now we multiply fraction value with 2 till we get whole number 1 at the end.

Fraction_Precision_01

We reach 1 so we stop

Write number from top to bottom

We get 0.5 = 1

Number (-26.5)10 = (11010.1)2

Convert Binary number to Exponent Form

11010.1 Will be 1.10101 * 24

Discard 1.

Take 11010 as Significand

Significand number = (11010)2

Significand bits are:

1 1 0 1 0

Fill the Significand in the beginning

Rest all fills it with 0’s

We will have

Significand bits are:

1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0

+4 is the Exponent

So we have to subtract it with 127

Exponent = 127+4=130

Exponent number (130)10 = (10000010)2

Discard overflow bit

Exponent bits are:

0 0 0 0 0 1 0

 

Note: we have to discard overflow bit since we have only 7 bits