When I was debugging communication protocols a long time ago, I would often have to convert a 32-bit integer into a 32-bit floating point number. This did not mean using atof, fscanf, _fcvt or similar function, but rather interpretting the bits as an IEEE 754 or IEC 60559:1989 floating point number. An example would be:

1.0 == 0x3F800000 (1065353216)

In the process, I wrote a tool that displays the components of the floating point number and allows you to change the raw hexadecimal bits. Here is a screen shot:

FloatScreenShot01

This tool was written with VB6 however I have always wanted to make a C++/WTL version of the tool. Maybe I will get around to it sometime. Here is a decent article describing the floating point format.

Float Tool Source: 18KB


Comment Section

Comments are closed.