For $x$ and $y$ binary digits $(0$ or 1$)$, let $x \oplus y$ be 0 if $x=y$ and 1 if $x \neq y$ (this operation is called exclusive or (often abbreviated to XOR), or addition mod 2).
(a) Let $X \sim \operatorname{Bern}(p)$ and $Y \sim \operatorname{Bern}(1 / 2)$, independently. What is the distribution of $X \oplus Y ?$
(b) With notation as in (a), is $X \oplus Y$ independent of $X ?$ Is $X \oplus Y$ independent of $Y ?$ Be sure to consider both the case $p=1 / 2$ and the case $p \neq 1 / 2$.
(c) Let $X_{1}, \ldots, X_{n}$ be i.i.d. Bern(1/2). For each nonempty subset $J$ of $\{1,2, \ldots, n\}$, let
$$
Y_{J}=\bigoplus_{j \in J} X_{j}
$$
where the notation means to "add" in the $\oplus$ sense all the elements of $J$; the order in which this is done doesn't matter since $x \oplus y=y \oplus x$ and $(x \oplus y) \oplus z=x \oplus(y \oplus z)$. Show that $Y_{J} \sim$ Bern $(1 / 2)$ and that these $2^{n}-1$ r.v.s are pairwise independent, but not independent. For example, we can use this to simulate 1023 pairwise independent