使用 bitstring 单元
import bitstring f1 = bitstring.BitArray(float=1.0, length=32) print(f1.bin)
输出:
00111111100000000000000000000000