How does the guess my age app guess your age?

Answer:
Since you're giving 7 yes/no answers, the app can pick different combinations of the numbers to identify up to 2^7 = 128 different possible choices. That's more than enough to guess your age. Basically, the numbers are presented in an order so that only one age will come out at the end. It looks at the digits of your age in binary, one at a time. So the first question will ask about 1, 3, 5... all numbers with a 1 in the last binary digit. The next will ask about 2,3,6,7, .... all numbers with a 1 in the next to last binary digit. Etc., until it knows the whole number.
Contributor: Messanger
First answer by Messanger. Last edit by Messanger. Contributor trust: 1 [recommend contributor recommended]. Question popularity: 13 [recommend question].