We know that a bit contain 2 values ( 0 and 1)
Bit Strings of length 7 either begin with two 0s or end with three 1s
= Strings of length 7 begin with two 0s + Strings of length 7 end with three 1s - Strings of length 7 either begin with two 0s or end with three 1s
Now Strings of length 7 begin with two 0s:
First Digit : 1 way ( it has to be 0)
Second Digit : 1 way ( it has to be 0)
Third Digit : 2 ways
Fourth Digit : 2 ways
Fifth Digit : 2 ways
Sixth Digit : 2 ways
Seventh Digit : 2 ways
No of ways = 1 x 1 x 2 x 2 x 2 x 2 x 2 = 32 ways
Now Strings of length 7 end with three 1s:
First Digit : 2 ways
Second Digit : 2 ways
Third Digit : 2 ways
Fourth Digit : 2 ways
Fifth Digit : 1 way (it has to be 1)
Sixth Digit : 1 way (it has to be 1)
Seventh Digit : 1 way (it has to be 1)
No of ways = 2 x 2 x 2 x 2 x 1 x 1 x 1 = 16 ways
Now Strings of length 7 either begin with two 0s or end with three 1s:
First Digit : 1 way (it has to be 0)
Second Digit : 1 way (it has to be 0)
Third Digit : 2 ways
Fourth Digit : 2 ways
Fifth Digit : 1 way (it has to be 1)
Sixth Digit : 1 way (it has to be 1)
Seventh Digit : 1 way (it has to be 1)
No of ways = 1 x 1 x 2 x 2 x 1 x 1 x 1 = 4 ways
= Strings of length 7 begin with two 0s + Strings of length 7 end with three 1s - Strings of length 7 either begin with two 0s or end with three 1s
= 32 + 16 - 4
= 44 bit strings
Thus 44 bit strings of length 7 either begin with two 0s or end with three 1s.