I think the first question should be understood as
"How many integers are there with k digits in its binary representation?".
Disregarding the special case n = 0, the first digit in the binary representation of a number n with k digits must always be 1. The rest however can be either 0 or 1...