def check_bit(value: int, bit: int) -> int:
    """Check n-th bit of value.

    Args:
        value: Number to check.
        bit: Bit number.

    Returns:
        N-th bit value

    Examples:
        >>> check_bit(0b1000, 0)
        0

        >>> bin(check_bit(0b1000, 3))
        '0b1000'
    """
    return value & (1 << bit)