Real number to Hex conversion
Posted on 1997-04-17
I have a programming assignment in which I have to convert
a C-double precision real number into a Hexadecimal number (and vice versa) MANUALLY -- that is, extracting the sign bit, exponent bit, mantissa bits and exponent bits using masks, performing bitwise operations and calculations and making the conversion from there. For example, if a user enters in 0.123456, the program would output the Hexadecimal form/equivalent of 0.123456. How do I go about doing this?