How many bitstrings of length 10 contain at least one zero?
A 10 digit string containing all 1s - 1111111111
And in all 10 digit string there would be atleast one 0.So our required answer would be total number of possibilities minus 1(ie the number with all 1s)
now we calculate no. Of possibilities of a 10 digit binary number - each digit has 2 options(either zero or one)
And the frst digit should always be 1(if it were to be zero it would reduce to 9 digit number)
So remaining are 9 digits and each digit has 2 options.So the total number of possibilities are 2*2*2.....9times=2^9
Now required answer is = 2^9-1
Get Answers For Free
Most questions answered within 1 hours.