A layman’s language explanation of how a calculator works

By MUNGAI KIHANYA

The Sunday Nation

Nairobi,

27 July 2008

 

When Daniel Kungu said “Tell me in a layman's language: How does a calculator work?”, he reminded me of a question in one of my examinations at university: “Explain Einstein’s theory of relativity to a ten year-old child!” But that’s not for today…

Before going into how a modern calculator works, it is important to understand the concept of an electric relay. This is a device that uses low voltage on one side (the primary) to switch a high voltage on and off on the other side (the secondary). It has an electromagnet (a length of insulated wire wound into a coil) that pulls onto a small piece of iron.

The iron is attached to the contacts (think of them as a switch) of the high voltage. When electric current flows through the coil, it creates magnetism that attracts the piece of iron that, in turn, pulls the contacts together to complete the connection for the high voltage.

Now, one can play a clever trick by connecting the relay as follows: a wire runs from the positive terminal of a battery; it goes through a switch; then to one of the primary poles of the relay; from the other primary pole it goes to a bulb and onwards to the negative terminal of the battery.

Next, another wire runs from the positive terminal of the battery to one of the secondary poles of the relay; from here it is connected back to the first wire, just after the switch. If you difficulty visualising it, draw it…

What happens when the switch is turned on? Electricity flows from the positive terminal of the battery, through the switch, into the primary side of the relay, onwards to the bulb (which turns on), and back into the battery through the negative terminal.

But something else also happens: when the electricity passes through the relay, it turns on the secondary side. This make a second connection for current to flow from the positive terminal of the battery, through the secondary poles of the relay, then to the primary poles, onwards to the bulb, and back to the battery.

If the switch is now turned off, current still continues to flow and the bulb remains on. This is because there are two alternate paths – the switch and the secondary poles of the relay. In computer parlance, we say that the connection has memory – it “remembers” to keep the bulb lighting even after the switch is turned off.

So what has this got to do with a calculator? Two things: first, a calculator only understands one (bulb is on) and zero (bulb is off); secondly, it needs some memory to do its manipulations.

The modern calculator does not have relays inside. It uses transistors that have been wired to replicate the action of a relay. The advantage of transistors is that they can be made very small (less than a thousandth of a millimetre) without losing the relay property.

With the concept of electric memory explained, we can now proceed to how to do computations…and that will be the subject for next week.

 
     
  Back to 2008 Articles  
     
 
World of Figures Home About Figures Consultancy