How many bit strings are there of length eight?

Always remember to have the definitions, axioms, lemmas, theorems, and corollaries necessary to solve the exercises you want to solve at hand (or memorized). Without that, you won’t be able to solve the exercises.

Relevant definitions for this exercise:

THE PRODUCT RULE: “Suppose that a procedure can be broken down into a sequence of two tasks. If there are n1 ways to do the first task and for each of these ways of doing the first task, there are n2 ways to do the second task, then there are n1n2 ways to do the procedure.”

THE SUM RULE: “If a task can be done either in one of n1 ways or in one of n2 ways, where none of the set of n1 ways is the same as any of the set of n2 ways, then there are n1 +n2 ways to do the task.”

The definitions were taken from the textbook Discrete Mathematics and its Applications by Rosen.

Now, let’s describe the solution to the problem in a similar way to the principles above.

A bit string is made using 0s and 1s.

So, we can choose the first bit in 2 ways. For each way we choose the first bit, we have two ways to choose the second bit, and so on and so forth.

Therefore, it follows that we must apply the product rule in this case.

Answer:

By the product rule, there are 28=256 bit strings of length 8.

Related exercises: