I don't have any way to see if I have done this in a correct way(no answers in my book). Did I do it right?
Question: "How many eight-bit strings either begin 100 or have the fourth bit 1 or both?"
My calculations: X - contains the strings that begins with 100 Y - contains the strings that has the fourth position set to 1
As I understand the question, this is how the bit string looks like: $[?????100]$. If it begins with 100.
The size of $|X|$:
Since we already have 3 bits already set, 100, that means we only have 5 bits that can change in value which gives us 32 combinations.
$|X| = 32$
The size of $|Y|$: Now we have 6 bits to work with. $2^7=128$
$|Y| = 128$
Combined $|X|∩|Y|$:Half of all bit strings contain the 1 bit on the fourth position. Which must mean half of the bit strings in X contain 1 on position 4. So I remove them, to not get repititon, now $|X|$ = 16
So $|X|U|Y|$ = 144
There are 144 bit string that either starts with 100 or has bit 1 on the fourth position.
Am I correct?