def toHex(self): '''Returns a hex representation of the EPCNumber''' #h = BitArray("0b%s" % self._bits) h = hex(int(self._bits,2)) return h[2:].upper()