def bit(value: int, byte: int, position: int) -> int:
    """Encode a bit value

    :param value: Value to encode
    :param byte: The byte to apply the value to
    :param position: The position in the byte to set the bit on

    """
    return byte | (value << position)