How to convert a float to its binary or hex representation in Python?
Say I want to convert the float 5.0 to its binary equivilient, how do I do this? I mean, how do I get Python to tell me that 5.0 (single precision) is described in machine code as something like
0000 0000 0000 0000 0100 0000 1010 0000 or 0000 40a0 ? Thanks for any thoughts. |
I don't know the answer, but wouldn't it be better if you posted this in the programming forum? Hint for the future ;) Sorry I couldn't help
|
All times are GMT -5. The time now is 10:30 PM. |