Could you please explain how to define a command \tower{<1>}{<2>}, whose first argument is to be the basis (and the exponent) while the second the number of its repetitions in successive exponentiations. To be more precise, for example \tower{2}{4} and \tower{3}{5} are to be, respectively:

I am particularly interested in pure TeX code.
The answer linked above applies\numexprcommand, which (aspercussewrote below) is frometexinventory. So could you please point to these plainTeXcommands which should be used to construct a suitable plain TeX counterpart of the linked solution. I am not asking for a full code, but for some hints rather.
\numexprTeX primitive? I could not locate it in the TeXbook index. – Rafał Gruszczyński May 07 '14 at 09:42etexgoodies. – percusse May 07 '14 at 09:43