\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
&&&&&|10111001\\
10111001&&\longrightarrow&&&+|1\\
\hline\\
&&&&&1|10111001
\end{align*}
\end{document}
Is the code I used to create the current output. Normally I'd use it for aligning equations at the = sign vertically, but I'm trying to create the above situation with it. Any other ways more elegant would obviously be much appreciated. I hope the provided image explains enough what I am trying to achieve, thanks.
reaction for more information.