def bit_is_set(bitmask, bit):
    """Return True if a specific bit is set in a bitmask.

    Uses the low bit is 1 and the high bit is 8.
    """
    bitshift = bit - 1
    return bool(bitmask & (1 << bitshift))