Hope that helps If I understand your question correctly, you want to find the underlying binary representation of an IEEE 754 binary64-format floating-point number, and show that binary representation in hexadecimal.

For obtaining the underlying bits, the

struct module is your friend. The

struct.pack operation lets you interpret the 8 raw bytes underlying the binary64 representation as a (byte)string of length 8, and the

struct.unpack operation will then let you re-interpret that string as a nonnegative integer (for example). Once you've got the integer, it's easy to find the hex representation. Here's a complete example for your data: