So I have $X$, a $Bin(5,0.5)$ variable and $Y$, a $Bin(7,0.5)$ variable. I have to find $P[|X-Y|=0]$. According to my understanding, this probability is equivalent to $P[X=Y]$, which is equal to $$\sum\limits_{k=0}^5 P[X=k,Y=k]$$
I took the upper limit of of the sum as 5 and not 7, since those probabilities are zero anyway. Is this method correct?