Can anyone explain me what does it mean to say "2 to the power of 32" for a possible range of values of a 32bit system?
I know it basically means 32 bits of binary (01) combinations, but I cannot figure it out clearly.
Can anyone explain me what does it mean to say "2 to the power of 32" for a possible range of values of a 32bit system?
I know it basically means 32 bits of binary (01) combinations, but I cannot figure it out clearly.
On
1 bit can take on 2 values: 0 or 1
2 bits can take on 2*2=$2^2$ values: 00, 01, 10, 11
3 bits can take on 2*2*2=$2^3$ values: 000, 001, 010, 011, 100, 101, 110, 111
...
32 bits can take on 2*....*2 = $2^{32}$ values: 00000000000000000000000000000000, 00000000000000000000000000000001, etc.
On
Here is another standard way to explain it, namely drawing a binary tree. At each level we chose either $0$ or $1$ to prefix the number we have compounded so far by. We can see how the number of nodes (naturally) doubles with each level in the tree. Try drawing such a tree for $32$ bits (I am joking).
If you do not like the content of this post, at least you gotta love the text art if nothing else :o)
000
/
00
/ \
/ 100
0
/ \ 010
/ \ /
/ 10
/ \
/ 110
X
\ 001
\ /
\ 01
\ / \
\ / 101
1
\ 011
\ /
11
\
111
The tree above only shows $n=3$ levels corresponding to $2^3=8$ bit strings. The $n$-th level has $2^n$ bit strings since the number of bit strings has been doubled $n$ times (starting from $1$ empty bit string of length zero at the top of the tree where the X is).
If you have $32$ bits, you have $32$ characters that can be either $0$ or $1$, i.e., you can choose either of two options when choosing one of the characters. For each of your choices concerning one of the characters, you have an additional choice between two values of the next character, so you have $2\cdot 2=2^2$ options in total for those two characters. For three characters you have $2\cdot 2 \cdot 2=2^3,$ and so on.
Try writing out the possible combinations of ones and zeros for some smaller amount of bits, say three:
$$000$$ $$001$$ $$010$$ $$011$$ $$100$$ $$101$$ $$110$$ $$111$$
which lists the $2^3=8$ possible strings.
So a $32$ bit system can be in $2^{32}$ different states, which is therefore the range of the system.