I'm have a little problem grasping string concepts. Here's my other question. Please provide explanation. How many 8 bit strings contain exactly three 0’s?
is 8 bit 8 binary digits?
yes
so there are 32 different possible combinations right?
I think so yes.
Not 32 what was I thinking its 2^8 which is 256
can you explain please?
8 binary digits, each binary digit can be either 1 or 0, so I did 2 x 2 x 2 x 2 x 2 x 2 x 2 x 2 or 2^8
but the question ask how many 8 bit string contain EXACTLY three 0's?
right, but I'm just saying there are 256 possible combinations
I don't understand the concept. what if it asked contain EXACTLY four 0's would the answer be the same?
No no no no , 256 is not the answer. I'm just saying there are 256 DIFFERENT combinations for binary in 8 digits
OK so how do I figure out the answer?
Now to find the answer we can do 8 choose 3, it basically means how many combinations of 3 things can come out of 8 places for lack of better words. The formula for this is (for a choose b) |dw:1327813091899:dw|
Join our real-time social learning platform and learn together with your friends!