The power of two

The power of two. For a given integer N, find the greatest integer x such that 2x is less than or equal to N. Print the exponent value and the result of the expression 2x. Do not use the ** operation.

Test Case Input (N) Expected Output
1 10 3
8
2 20 4
16
3 5 2
4