An element $a\in\mathbb{Z}/n\mathbb{Z}$ is a unit if and only if $(a,n)=1$, that is, if and only if $a$ and $n$ are relatively prime. In your case, since the only prime divisor of $n=2^k$ is $2$, this equivalence reduces to $a$ is a unit if and only if $a$ is odd. Hence, the elements of $(\mathbb{Z}/2^k\mathbb{Z})^*$ are $$1,3,5,7,\ldots,2^k-5,2^k-3,2^k-1$$
of which there are $2^{k-1}$, or just half of $2^k$ because we are only taking odd elements. Now $(\mathbb{Z}/2^k\mathbb{Z})^*$ is not cyclic for $k\ge 3$ (read here, which states that $(\mathbb{Z}/2^k\mathbb{Z})^*\cong\mathbb{Z}/2\mathbb{Z}\times\mathbb{Z}/2^{k-2}\mathbb{Z}$). It follows that any element $a$ must have order less than $2^{k-1}$, but still dividing $2^{k-1}$, and hence must be no larger than $2^{k-2}$.