Implemented binary exponentiation