There’s a simple circuit out there (a AND b; a XOR b), that has inputs and outputs. When representing a ‘high voltage’ with a 1 and a ‘low voltage’ with a 0, the table for its in/outputs are below:
a,b | Out
–|—
0,0 | 0,0
0,1 | 0,1
1,0 | 0,1
1,1 | 1,0
Now, if you change the name of the second column to ‘a+b’, you’ll notice that the Out column already equals the answer to a+b (when converted to binary). And this is all with just electricity!
Computers have a bunch of similar circuits inside of them. Some are for adding numbers together, some are for adding *more complex* numbers together, some are for multiplying numbers. But in the nitty gritty, it’s circuits that have inputs and outputs that behave like arithmetic.
Latest Answers