Recurrent Neural Network (RNN) can be trained to add arbitrary numbers.
Though it is simpler to do so in binary than other number systems since binary is just 1s and 0s thus it is easier to represent this using neural networks. You just need to work in binary then change the resulting sum back to the number system of your choice.
The reason for using RNNs is that you can teach them the addition of arbitrarily long binary codes. This is not feasible for typical ANNs as they can be limited to a particular length of binary code.
Although simpler approaches might work without needing much data e.g. linear regression.
Essentially, a label is nothing but a function f(x) at some x = a where x is typically an array of vectors x1, x2, …etc. So given enough examples of addition i.e. having the numbers you want to add as attributes and the sum as the label, your model should be able to perform addition once you have good training accuracy.
A linear regression model treats every data point as
f(x) = ax1+bx2+cx3+…
Essentially, once you learn a, b,c,.. are always 1, your model should be able to perform addition.
Trying to use images directly where you would have the issue of A+B>=10 is a more complex way of dealing with this problem. I would first identify the digits to convert it into integers (or even floats) and then deal with this.