Guess the Number

The computer Guesses a random number and you have to guess the same
number in limited number of timer.
Hint: use binary search algorithm.