How to convert the binary form of a float to an integer, and vice versa?