def check_binary(check_number):
    """
    function that checks if the input consists of either 0 or 1.
    As the binary numbers can only be 0 or 1, so we need to check this
    before doing any calculations on it.

    :param check_number: the number entered by the user
    :return: True/False
    """
    check_list = [int(i) for i in (sorted(set(list(str(check_number)))))]

    print(f'\nchecking {check_number}')
    for number in check_list:
        if number not in [0, 1]:
            # print(f'invalid binary number')
            return False
    return True