Skip to content
Related Articles

Related Articles

ISRO | ISRO CS 2014 | Question 19
  • Last Updated : 14 May, 2018

The number of bit strings of length 8 that will either start with 1 or end with 00 is?
(A) 32
(B) 128
(C) 160
(D) 192


Answer: (C)

Explanation:
(I) Number of 8 bit strings starting with 1 : 1 _ _ _ _ _ _ _ = 27 = 128
(II) Number of 8 bit strings ending with 00 : _ _ _ _ _ _ 00
It has 2 possibilities:
if the string starts with 0 then total strings = 25 = 32
and if the string starts with 1 then total strings = 32 but they are already covered in all the strings starting with 1
So, total number of strings = 128 + 32 = 160


Quiz of this Question

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :