The question might be of the form Is your number 11?. The
applet above simulates this type of question. The answer to such a
question, if no, eliminates a single number. This is shown by clicking
on a number and watching the number's cell go dark. In the worst case,
the number of questions needed to succeed is 31.
The question might be of the form Is your number less than 11?
If the guessed number is middle of a range of unknown numbers, the answer to
a single question can eliminate the need to check 1/2 of the unknown numbers.
This results in a worst case number of questions equal to 5.
The dark cells either have been checked or need not be checked.
Another variant of the binary search applet.