✔ 最佳答案
let X be the set of 8-bit string starting with a 1, and Y be the set of 8-bit string ending with a 1
Here X and Y are not disjoint subsets, since a 8-bit string CAN both start and end with 1, such as 10000001. Therefore, by the given formula, no. of 8-bit strings satisfying either X or Y is equal to |X| + |Y| - |XY|
|X| = no. of 8-bit string starting with 1, i.e. no. of 8-bit string from 10000000 to 11111111
= 2^7 = 128
|Y| = no. of 8-bit string ending with 1, i.e. 00000001, 00000011, 00000101, 00000111, ... 11111101, 11111111
= 2^7 = 128
|XY| = no. of 8-bit string BOTH starting and ending with 1, i.e. 10000001, 10000011, 10000101, 10000111 ... 11111101, 11111111
= 2^6 = 64
so, no. of 8-bit string either start with a 1 or end with a 1 = 128 + 128 - 64 = 192