Answer to Question #144660 in Assembler for Promise Omiponle

Question #144660
Determine the decimal value represented by IEEE-754 single-precision floating-point
format 0x40CC0000.
1
Expert's answer
2020-11-22T23:40:09-0500

0x40CC0000 Hexadecimal representation

0100 0000 1100 1100 0000 0000 000 0000 Binary representation

Sign

bit   Exponent                   Mantissa

+1        2^2                     1 + 0.59375

---- | ---------------|  |-------------------------------------------|

0    10000001   1001100000000000000000

 

Sign bit:       0

Mantissa:    1001100000000000000000

Exponent:    10000001

The general representation formula is:

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

 

Conversion:

The value of a IEEE-754 number is computed as:

The sign is stored in bit 32. The exponent can be computed from bits 24-31 by subtracting 127. The mantissa (also known as significand or fraction) is stored in bits 1-23. An invisible leading bit (i.e. it is not actually stored) with value 1.0 is placed in front, then bit 23 has a value of 1/2, bit 22 has value 1/4 etc. As a result, the mantissa has a value between 1.0 and 2:

Mantissa:         1 + 1/2 + 1/16 + 1/32 = 1.59375

Exponent:        129 – 127 = 2     --> 2^2

Sign:                (-1)^0 = 1

 

ANSWER:

1 x 4 x 1.59375 = 6. 375


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