  Given an ideal $I$ in a polynomial ring $K[x_1,\dots,x_n]$ over a field $K$,
we present a complete algorithm to compute the binomial part of $I$, i.e., the
subideal ${\rm Bin}(I)$ of $I$ generated by all monomials and binomials in $I$.
This is achieved step-by-step. First we collect and extend several algorithms
for computing exponent lattices in different kinds of fields. Then we
generalize them to compute exponent lattices of units in 0-dimensional
$K$-algebras, where we have to generalize the computation of the separable part
of an algebra to non-perfect fields in characteristic $p$. Next we examine the
computation of unit lattices in affine $K$-algebras, as well as their
associated characters and lattice ideals. This allows us to calculate ${\rm
Bin}(I)$ when $I$ is saturated with respect to the indeterminates by reducing
the task to the 0-dimensional case. Finally, we treat the computation of ${\rm
Bin}(I)$ for general ideals by computing their cellular decomposition and
dealing with finitely many special ideals called $(s,t)$-binomial parts. All
algorithms have been implemented in SageMath.
