For a computer to do basic math, it can use logic gates like AND and OR. These logic gates can be made out of voltage sources and resistors, as seen on Wikipedia.
For a computer to do multi-digit math, it also has to store stuff in memory, and then find where it is. However, which circuit components can be combined to make a pointer in memory? This link describes a basic shift-add algorithm - while I slightly understand the methods the computer uses to do math, how does it find which memory unit is the correct one?