How many bit strings of length $8$ have either exactly two $1$-bit among the first $4$ bits or exactly two $1$-bit among the last $4$ bits?
My solution:
A bit only contains $0$ and $1$, so $2$ different numbers, i.e., $0$ and $1$. For the first part we have $2^6=64$ ways. Similar for the other way. Hence there exists $2^4=16$ bit strings. Is my answer true?
Update: I mean $2^6+2^6-2^4=112$ bit strings
The simplest solution is the best. There are only 256 possibilities to check so just list them!
There are 156 such strings.
Do you still believe there are only 112? If so, then which ones did I either list twice, or list in error?