PDA

View Full Version : converting 29 and 0.7 to IEEE single precision floating point


KataKoniK
Oct15-05, 12:55 PM
I am having difficulty in converting 29 and 0.7 to IEEE single precision floating point.

For 29,

I represent 29 as a product of a power of 2 using 58/4 * 21.
However, I am having trouble getting the mantissa value because 58/4 is 14.5, and I need something in the format of 1.[numbers]. Any help would be great, thanks.

For 0.7,

I do not know how I would represent 0.7 as a product of a power of 2 because there is no exact binary number representation for 0.7. Any help would be great, thanks.

mathmike
Oct15-05, 01:53 PM
are you trying to write a computer program to do this or just need to convert

KataKoniK
Oct15-05, 02:03 PM
Hi,

I just need to convert it. Not writing a program.

mathmike
Oct15-05, 03:10 PM
here is a link that i think will answer any question you have about this subject

http://www.cprogramming.com/tutorial/floating_point/understanding_floating_point_representation.html

Integral
Oct15-05, 03:24 PM
However, I am having trouble getting the mantissa value because 58/4 is 14.5, and I need something in the format of 1.[numbers]. Any help would be great, thanks.


Isn't 14.5 = 1.[numbers] x101

KataKoniK
Oct15-05, 03:51 PM
Isn't 14.5 = 1.[numbers] x101

Yes, but how would you represent that in mantissa?


I'll check out that link mathmike, thanks.