code: def parseBits(self, hexcode, width):
          
          bitarray = []
          for byte in hexcode[::-1]:
              bits = int(byte, 16)
              for x in range(4):
                  bitarray.append(bool((2 ** x) & bits))
          bitarray = bitarray[::-1]
          return enumerate(bitarray[:width])
docs: enumerate over bits in a line of data