Theorem: Every function $f: \{0,1\}^n \rightarrow \{0,1\}^m$ can be computed by a Boolean circuit of size $\mathcal{O}(m\cdot n\cdot 2^n)$.
Let $S(f) = \{\alpha \in\{0,1\}^n : f(\alpha) = 1\}$.
Definition: For a string $\alpha\in\{0,1\}^n$, define $E_\alpha : \{0,1\}^n \rightarrow \{0,1\}$. Where $E_\alpha(x)$ is $1$ iff $x =\alpha$.
If $\alpha = 111…$, we can construct a circuit for $E_\alpha$ using $n-1$ gates (just ANDs).
What about for any $\alpha$? Add a NOT for any $0$.
Hence, size of circuit is bounded by $2n-1$.
But what about for any $f$?
Let’s use our set $S(f)$. This has the collection of all strings that have $1$ as an output.
We can just OR on $E_\alpha(x)$ for every $\alpha$ in $S(f)$.
The number of strings where $f$ evaluates to $1$ is at most $2^n$.