### Re: Can you tell me how a calculator calculate ( works)

Date: Sat Mar 17 15:23:43 2001
Posted By: Eric Maass, Director, semiconductors / communication products
Area of science: Computer Science
ID: 982313677.Cs
Message:

Wow, Vincent. The bigger question is, how can we explain how a calculator works, to your 5 year old son? First, my hats off to your son - it's great that he is interested in how things work at such a young age.

Here is the best I can do to explain things at what I hope is a level your son can understand:

Luckily, calculators can use arithmetic that is easy compared to the arithmetic you will be learning or have been learning.

```4 + 3 = 7
and
2 + 9 = 11
and
5 + 5 = 10
and
8 + 7 = 15
```
There are a hundred (100) addition facts like this that you will memorize to learn your addition facts.

Our arithmetic system is based on the number 10. When you say 34, thirty four, you mean 3 tens and 4 ones. We use this ten-based system because we have 10 fingers and 10 toes, so we based oour system on counting with our fingers and toes..which is how we kind of started off. We can represent 10 numbers with our 10 fingers.

Luckily, as I said before - the calculator uses arithmetic that is a bit easier. A calculator has no fingers or toes...but it can change voltage levels, like the voltage on the batteries you use in your flashlights and in some of your toys. You can connect the battery, and turn the flashlight or toy "ON" or "OFF". These two levels, ON or OFF, are the two levels that the calculator uses in its arithmetic.

Let's call the "OFF" level "0", and the "ON" level "1". In this simpler arithmetic system, instead of 100 addition facts, there are only 4:

```0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = two... which in this type of arithmetic is written as:
1 + 1 = 10 (because there is no 2 in a system with just 1's and 0's)
```
Just like 34 in our 10 based "Decimal" numbering system means 3 tens and 4 ones, the 10 in the calculator's "BINARY" numbering system means 1 two and 0 ones. So, 10 in binary arithmetic means 2 in our Decimal arithmetic.

So, the calculator only has to deal with 4 addition facts.

```0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 10
```
We can represent any number with binary numbers. Just like decimal numbers go with hundreds, tens, and ones:
```hundreds     tens    ones
4         7       3         = 4 hundreds + 7 tens + 3 ones = 473
```
binary numbers go with eight's, four's, two's, and one's.... for example:
```eights fours  twos   ones
1        1     0      1         = 1 eights + 1 fours + 1 ones = 13 (thirteen)
and
0        1     1      1         = 1 fours + 1 twos + 1 ones = 7 (seven)
and
0        1     0      0         = 1 fours = 4 (four)
and
1        0     0      1         = 1 eights + 1 ones = 9 (nine)
```
Here, then, is how a calculator works... let's say you want to add 9 + 4 ...(the secret answer is 13)...ready??

VINCENT AND SON - HUMAN CALCULATORS IN ACTION

Step 1) Convert the first number to be added from decimal to binary
9 in decimal is 1 0 0 1 in binary.... (see above.. 1 in the eights column plus 1 in the one's column = 9)
Step 2) Put it in a memory storage place (called a register) to use later
Step 3) Convert the second number to be added from decimal to binary
4 in decimal is 0 1 0 0 in binary (see above... 1 in the fours column is 4)
Step 4) Put it in another register
Step 5) Add the two numbers in the registers using binary addition
```       1 0 0 1
+  0 1 0 0
-----------
=  1 1 0 1 in binary  (try it yourself)
```
Step 6) Convert the number from binary to decimal
From above, you can see that 1 1 0 1 in binary is 1 eights plus 1 fours plus 0 twos plus 1 ones = 8 + 4 + 1 = 13.

So, a calculator works by converting decimal numbers to binary, doing binary arithmetic on the binary numbers, converting the results to decimal numbers that we humans work with, and displaying the results using light emitting diodes or liquid crystals so you can see the result.

I don't know if this is way too complicated for your son...it may be..but it's as simple as I can make these complex concepts.

Current Queue | Current Queue for Computer Science | Computer Science archives