My Math Forum

My Math Forum (http://mymathforum.com/math-forums.php)
-   Algebra (http://mymathforum.com/algebra/)
-   -   Floating Point Numbers - Single Precision Format (help!) (http://mymathforum.com/algebra/2010-floating-point-numbers-single-precision-format-help.html)

RonnieStokie December 11th, 2007 12:26 PM

Floating Point Numbers - Single Precision Format (help!)
 
How would a computer store the following floating point number in Single Precision format:

3.08 x 10^4

I just don't know where to start, help appreciated. Im stuck on this as i dont know how to start it off as there are two numbers. Do i just multiply those two numbers together, which will be "320.32" and then just work it out in the same process as below?


I can work out the following though, as there is only one thing to work out:

a) 214.75 = 11010110.11
x = 1.101011011 x 27
Mantissa = 1101 0110 1100 0000 0000 0000 (24 bits)
E-B = 7
E=B+7 =127+7 = 134
E= 134 = 1000 0110
S = 1
E = 1000 0110
M= 1101 0110 1100 0000 0000 0000

1100 0011 0101 0110 1100 0000 0000 0000
C 3 5 6 C 0 0 0

00 C0 56 C3

skipjack December 11th, 2007 08:30 PM

Are you sure it was supposed to be 104, not 10^4?

RonnieStokie December 12th, 2007 12:21 PM

Quote:

Originally Posted by skipjack
Are you sure it was supposed to be 104, not 10^4?

Yes, sorry, my mistake.

It's supposed to be 10^4.

skipjack December 12th, 2007 09:36 PM

3.08 × 10^4 = 30800, which is 111100001010000 as a binary integer.
Can you finish from there?

(Note: Single Precision probably means "single precision floating point", for which the mantissa's magnitude typically lies between 1/2 and 1 by suitable choice of exponent.)


All times are GMT -8. The time now is 06:59 PM.

Copyright © 2019 My Math Forum. All rights reserved.