permutations of binary sequences

124 Views Asked by At

What is the proof that there are $2^n$ distinct binary codes of length n I know this progression also applies to the decimal ($10^n$) and hex ($16^n$) systems but how can this be shown?

1

There are 1 best solutions below

0
On BEST ANSWER

You can apply the rule of product.

You have $n$ positions that can take the value $0$ or $1$. Then, you have two ways of filling the first position, two for the second.. etc... Hence the total number is $\underbrace {2 \times 2 \dots \times 2}_n = 2^n$.

That's the same reasoning by which you deduce that there are 1000 numbers with three decimal digits (including leading zeroes).