  In this paper we prove a discrete version of Tanaka's Theorem \cite{Ta} for
the Hardy-Littlewood maximal operator in dimension $n=1$, both in the
non-centered and centered cases. For the discrete non-centered maximal operator
$\widetilde{M} $ we prove that, given a function $f: \mathbb{Z} \to \mathbb{R}$
of bounded variation, $$\textrm{Var}(\widetilde{M} f) \leq \textrm{Var}(f),$$
where $\textrm{Var}(f)$ represents the total variation of $f$. For the discrete
centered maximal operator $M$ we prove that, given a function $f: \mathbb{Z}
\to \mathbb{R}$ such that $f \in \ell^1(\mathbb{Z})$, $$\textrm{Var}(Mf) \leq C
\|f\|_{\ell^1(\mathbb{Z})}.$$ This provides a positive solution to a question
of Haj{\l}asz and Onninen \cite{HO} in the discrete one-dimensional case.
