standalone class would not crop AMS equations properly (left and top margin space remains)

I think you need an output that does not span across multiple page then converting displayed equations to inline equations.

\documentclass[margin=1pt]{standalone}
\usepackage{amsmath}

\begin{document}
$\!
\begin{gathered}
2^{1}=\binom{1}{0}+\binom{1}{1}\\
2^{2}=\binom{2}{0}+\binom{2}{1}+\binom{2}{2}
\end{gathered}
$
\end{document}

enter image description here

Notes:

  • margin of 1 pt is optionally added, remove it if you do not need it.

  • \! is important to remove the unnecessary whitespace.

  • use \displayequation after the opening $ if you need displayed version of "font".

The above is for gathered, for aligned see the following.

\documentclass[margin=1pt]{standalone}
\usepackage{amsmath}

\begin{document}
$\!
\begin{aligned}
2^{1}&=\binom{1}{0}+\binom{1}{1}\\
2^{2}&=\binom{2}{0}+\binom{2}{1}+\binom{2}{2}
\end{aligned}
$
\end{document}

enter image description here