I have encountered an equation I do not understand:
\begin{multline*} -\sum_{x}\sum_{y}p(x,y)(\log_{2}p(x)+\log_{2}p(y)-\log_{2}p(x,y))\\ =-\sum_{y}p(y)\log_{2}p(y)+\sum_{x}p(x)\sum_{y}p(y|x)\log_{2}p(y|x) \end{multline*}
Mainly, I do not understand how we went from ordinary probabilities to conditional ones.
The post Mutual Information: How these two equations are equal? is similar, but conditional probability is not used.
The middle term on the left side is the first term on the right side. (Just note that $\sum_x p(x,y)=p(y)$). In the other two terms on the left just put $p(x,y)=p(y|x)p(x)$ to complete the argument.