Eli5 Calculators, how do they work?

275 views

How do calculators work? Like the device, not a calculator app. Help!

In: 0

3 Answers

Anonymous 0 Comments

You have two light switches to control a single bulb. They’re wired so that if either switch is ‘on’ then the bulb will be on. This is a simple comparison, which can be simplified to “If switch 1 or switch 2 is on, then the bulb is on”.

Now we use electronic switches – instead of a bulb we have another switch connected to more switches down the line. We can make huge chains of switches that can compare any number of inputs and create countless outputs.

So we chain these switches in a way that will add binary numbers together. Just like addition with digital numbers, binary numbers follow simple rules (add the first digit, carry remainder to the next digit, repeat).

This is the “adder” part of the calculator.

Next we have a clock. It automatically flips one switch over and over again, and this tells the calculator when it can move on to the next step. We need this for multiplication – a collection of switches will do addition over and over again every cycle of the clock until it has finished doing the multiplication.

Everything else can be simplified down to repetition (controlled by the clock and counting switches) and addition (controlled by the adder). Subtraction and addition work the same way, and division is done a lot like multiplication.

You can make more circuits like the adder, to do things faster, since repetitively adding things can take a while when you’re doing complex math. That’s the gist, though.

You are viewing 1 out of 3 answers, click here to view all answers.