How many 8-bit sequences begin with $101$ OR (inclusive) have a $1$ as their fourth bit?
For the first condition, we need only to decide the values of the $5$ other bits, so there are
sequences starting with $101$.
For the second condition, we have to decide the values of the other $7$ bits, so there are
sequences with a $1$ as their fourth bit.
The final answer, however, surely cannot be
Because $2^5$ includes some scenarios with a $1$ as the fourth digit, whereas $2^7$ includes cases with a $101$ at the beginning, so I would be over-counting this. What do I do in this case?