How many binary numbers can be represented with X number of number places?

1.6k Views Asked by At

How do we find out that in the binary number system, how many different numbers can be represented with a certain number of number-places?

For example, suppose we have 8 number places, i.e. a 1's place, a 2's place, a 4's place, a 8's place, a 16's place, a 32's place, a 64's place and a 128's place. How can I find out how many binary numbers can be represented on this number of number places?

Please explain your answer a bit, and please keep the jargon extremely simple.

2

There are 2 best solutions below

0
On BEST ANSWER

$n$ places = $2^n$ possibilities.

Proof by induction: $n=1$ clear, $n \rightarrow n+1$: Suppose the claim was true for an $n \in \mathbb N$. Then the possibilities you can achieve with $n+1$ places are

1.) All the possibilities with $n$ places with an additional $1$ at the beginning

2.) All the possibilities with $n$ places with an additional $0$ at the beginning

Hence, you have twice as many possibilities as with $n$ places, therefore $2 \cdot 2^n = 2^{n+1}$ possibilities.

0
On

Every positive integer has a unique binary representation.The largest integer that can be expressed by $n$ bits is $\underbrace{1\cdots1}_{n \text{ } 1\text{'s}}$, which is $1+2+2^2+\ldots+2^{n-1} = 2^n-1$. The smallest integer that can be expressed by $n$ bits is clearly just $0$. Therefore we can express any integer between $0$ and $2^n-1$ (inclusive) using $n$ bits, for a total of $2^n$ integers.