Answer to Question #151434 in Assembler for shanto

Question #151434
In 8087 math co-processors, what is the bias for a double precision floating point
representation? Demonstrate the conversion of a 64 bit floating point number into
corresponding decimal value.
1
Expert's answer
2020-12-18T10:50:06-0500

In double precision floating point the bias is 1023.

The general representation formula is:

(-1)^s * (1+mantissa) * 2^(Exponent – 1023)

Sign

bit   Exponent                        Mantissa

63 62                 52    51                                                                                                                         0

 1  100 0000 0011    1010 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000

 (-1)^1        2^4                     1 + 1/2 + 1/8

-1 * 16 * 1.625 =-10

The value of decimal number is computed as:

The sign is stored in bit 63. The exponent can be computed from bits 62-52 by subtracting 1023. The mantissa is stored in bits 0-51.

An invisible leading bit (i.e. it is not actually stored) with value 1.0 is placed in front, then bit 51 has a value of 1/2, bit 50 has value 1/4 etc.



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS