When a value $x$ is a power of $2$, that is, $x = 2^n$ for some nonnegative integer
n, we can readily write $x$ in hexadecimal form by remembering that the binary
representation of $x$ is simply $1$ followed by $n$ zeros. The hexadecimal digit $0$
represents $4$ binary zeros. So, for $n$ written in the form $i + 4j$ , where $0 ≤ i ≤ 3$,
we can write x with a leading hex digit of 1 (i = 0), 2 (i = 1), 4 (i = 2), or 8
$(i = 3)$, followed by $j$ hexadecimal $0$s. As an example, for $x = 2,048 = 2^{11}$, we
have $n = 11= 3 + 4 . 2$, giving hexadecimal representation 0x800
.
I have few questions about the above statement.
Firstly, if $x = 2^n$, then why the binary representation of $x$ is simply $1$ followed by $n$ zeros? More specifically, why $1$? We can see the representation at the end is 0x800
, which is $8$ followed by $2$ zeros.
Secondly, the form $i + 4j$, since the hexadecimal digit $0$ represents $4$ binary zeros, I guess there is some relation between. But I'm still not clear why.
I'm not sure if I can totally understand it if I solved these two questions. I feel mess up. I'll appreciate it if someone can expand this statement and make a better explanation.
Thank you so much!