Let $X$ and $Y$ be Bernoulli random variables with parameters $0\leq q< r\leq 1$ respectively. That is $P(X=0)=1-q=1-P(X=1)$ and similarly for $Y$. To pick up a uniform random variable $U$ at $[0,1]$. Let $X'=\mathbf{1}_{U\leq q}$ and $Y'=\mathbf{1}_{U\leq r}$.
Why we can get
$$\mathbb{P}((X', Y')=(0, 0))=1-r$$ $$\mathbb{P}((X', Y')=(0, 1))=r-q$$ $$\mathbb{P}((X', Y')=(1, 0))=0$$ $$\mathbb{P}((X', Y')=(1, 1))=q?$$
$$ \mathbb{P}((X', Y')=(0, 0))=\mathbb{P}(U>q, U>r) \overset{r>q}{=} \mathbb{P}(U>r)=1-r. $$ $$ \mathbb{P}((X', Y')=(0, 1))=\mathbb{P}(U>q, U\leq r) = \mathbb{P}(q<U\leq r)=r-q. $$ Try to consider the last two equalities in the same manner.