Binary Entropy Calculator

This calculator returns the entropy \(H(X)\) of the random variable \(X \sim \text{Bernoulli}(p)\) in bits.

Result:

\(H(X) = \) 1 bit per channel use.

Formula Used:

\begin{equation} H(X) = -p\log_2(p) - (1 - p)\log_2(1-p) \end{equation}

Notes on limits:

\begin{equation} \lim_{p \to 0} p \log_2(p) = 0 \end{equation}

Reference (Courtesy of Claude E. Shannon):

A Mathematical Theory of Communication, Part I-6