def as_float32(self):
    """
    See: http://en.wikipedia.org/wiki/IEEE_754-2008
    """
from struct import pack, unpack
s = self.bitlist
return unpack('f', pack('I', bits2int(s)))

def bits2int(bits):
    bits = [int(x) for x in bits[::-1]]
x = 0
for i in range(len(bits)):
    x += bits[i] * 2 ** i
return x
converting binary string into float