Writing bits to a binary file,"f.write(struct.pack('i', int(bits[::-1], 2)))"