code: def byte2bit_string(data):
      
      if isinstance(data, basestring):
          assert len(data) == 1
          data = ord(data)
  
      bits = '{0:08b}'.format(data)
      bits = bits[::-1]
      return bits
docs: >>> byte2bit_string("H")
      '00010010'
  
      >>> byte2bit_string(0x55)
      '10101010'