def bit_read(data, position):
    """Returns the value of a single bit in a number.

    :param: data     The number (bytearray) that contains the desired bit.
    :param: position The position of the bit in the number.

    :return: The bit value (True or False).
    """

    byte_pos = int(position // 8)  # byte position in number
    bit_pos = int(position % 8)    # bit position in byte
    return bool((data[byte_pos] & (1 << bit_pos)) >> bit_pos)