How many bytes contain exactly two 1's? I know that the answer is C(8,2), but I don't get, why. Can anyone, please, explain it?

Landen Salinas

Landen Salinas

Answered question

2022-09-22

How many bytes contain exactly two 1's?
I know that the answer is C ( 8 , 2 ), but I don't get, why. Can anyone, please, explain it?

Answer & Explanation

Kody Gates

Kody Gates

Beginner2022-09-23Added 5 answers

𝐶(8,2) means "8 choose 2", which in this case should be interpreted as "how many ways can you choose 2 items out of 8 possible". Here the 8 items are the bits, and the 2 comes from the bits you "select to be 1". That is, there are just as many bytes with exactly two 1s as there are ways to select 2 bits from 8 possible.
likovnihuj

likovnihuj

Beginner2022-09-24Added 2 answers

C [ 8 , 2 ] = 8 ! 2 ! ( 8 2 ) ! = ( 8 ! / 6 ! ) / 2 ! = ( 8 7 ) / 2 = 28. Think of it this way. The 8 is the choice of the first bit, and the 7 is the choice of the second bit (it's only 7 because there are only 7 bits available after the first bit is decided). The 2 represents the number of permutations of the chosen bits. We divide by 2 because we don't want to count each ordering of the chosen bits separatetly.

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?