Solution
= Solution
The error indicator is a Bernoulli random variable with probabilities $P(Z=1)=p_e$ and $P(Z=0)=1-p_e$. Its <Shannon entropy> is therefore the <binary entropy>
$$
\boxed{H(Z)=h(p_e)=-p_e\log_2p_e-(1-p_e)\log_2(1-p_e).}
$$
Use $0\log_2 0=0$, so this expression also covers error probabilities zero and one.