[Tex/LaTex] How to present a vertical multiplication/addition

math-modemath-operators

How do I present vertical (columnar) multiplication and addition in LaTeX.
Like this:
http://mathworld.wolfram.com/LongMultiplication.html

    3 8 4
x     5 6
---------
  2 3 0 4
1 9 2 0
---------
2 1 5 0 4

I used the "array" environment. But i have right align problem. Any other best ideas?

Best Answer

the xlop package does this sort of thing. It does warn that it uses "french conventions", but at least for multiplication it looks fine, to me.

disclaimer: i last did multiplication sums in school in the 1950s...

\documentclass{article}
\usepackage{xlop}
\begin{document}
\opmul{384}{56}\qquad
\end{document}

output image