Numbers are represented in reverse order
The first problem I'm having, as shown in the figure (nums), is that the Arabic numbers get represented in reverse order.
for example 10 -> 01
Another problem I'm having is that when I write functions in Arabic, they get reversed. In other words, your program allows writing only from left to right, which is causing that problem. As shown in the figure (func).
I hope you solve that problem and make it possible to write from right to left.