def bitString(integral_value, min_bits=8):
    """ Return a string representation of a binary value

    Return a string representation of a binary value, padded with zeros in the
    higher order bits if necessary
    @param integral_value: integer or long integer to convert to bit string
    @type integral_value: int
    @param min_bits: minimum number of bits to display in the result
    (pad zeros to the left if necessary)
    @type min_bits: int
    @return: ascii string containing the binary representation of the
    of the input value
    @rtype: str
    """
    bitstring = bin(integral_value).split('b')[1]
    pad_zeros = min_bits - len(bitstring)
    if pad_zeros > 0:
        bitstring = '0'*pad_zeros + bitstring
    return bitstring