0
$\begingroup$

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?

$\endgroup$
1
$\begingroup$

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).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.