How many bit strings of length 8 begin and end with a 1?

$\begingroup$

A bit string is a finite sequence of $0$’s and $1$’s. How many bit strings of length $8$ begin and end with a $1$?

My answer would be: $2^6$. Because we know, that the bit starts with $1$ and ends with $1$: Which means, that $2$ of the length $8$ is used, also there are $6$ positions remaining, which is $2^6 = 64$.

Is this the correct answer?

$\endgroup$ 3

2 Answers

$\begingroup$

Yes the answer $2^6$ is correct. Two bits you know are $1$ already, so there are $8-2=6$ bits left. Each bit can either be a $0$ or a $1$, so you have $2$ possibilities for each slot. Hence, as you concluded correctly, you have $2 \cdot 2 \cdot 2 \cdot 2 \cdot 2 \cdot 2 = 2^6$ possible combinations for your string.

$\endgroup$ 1 $\begingroup$

Since there is one choice for the first position, one choice for the last position, and two choices for each of the six positions between them, the number of bit strings of length eight that begin and end with a $1$ is $2^6$, so your solution is correct.

$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like