I am planning to draw an arrow over the digits like in the figures:
So far I tried $\overset{\curvearrowleft}{5}$
, but It didn't produce arrows as the figures. I also tried this:
\usepackage{tikz}
\usetikzlibrary{arrows.meta, matrix}
\begin{tikzpicture}
\matrix[
matrix of math nodes,
nodes in empty cells,
row sep=4pt,
column sep=4pt,
] (mymatr) {
1& 0 &1 &0 &1 &0 &1& 0& 1\\
&+&1& 0& 1&0& 1& 0& 1\\
1& 0 &1 &0& 1& 0& 1& 0& 1\\
};
\draw ([yshift=-2pt]mymatr-2-1.south west) -- ([yshift=-2pt]mymatr-2-9.south east);
\draw[-Latex] (mymatr-1-4.north) to[in=90, out=90, looseness=2] node[midway, above, font=\footnotesize]{$1$} (mymatr-1-3.north);
\end{tikzpicture}
This code is burden for whole document. It should be independent of any other nodes/elements of tikz (without mymatr-1-4.north
etc.).
I need a single line and short solution to draw the arrow as I have lots of places where the arrows will be drawn in the whole document. That's why I want make it simple, easy to use, inline and also parametric (as you see in the second figure, the number may contain multiple digits).