BinarySearch and Exponentiation