NTT DATA interview question

What is the logic for binary search?