How a calculator uses zeros & ones to get the correct answers

By MUNGAI KIHANYA

The Sunday Nation

Nairobi,

03 August 2008

 

I did not get any questions from readers regarding last week’s article on the concept of electric memory. This can mean one of two things: either it was crystal clear or it was completely unintelligible! I will go for the former and continue the discussion…

From last week, it came out that calculators work in zeros and ones only; and that they need memory to carry out computations. However, in everyday counting, we use ten symbols to represent numbers, namely, 0, 1, 2 … 9.

Thus when a number is typed on the calculator, it is first converted from the ten symbol system (base ten) to base two. After conversion, it comes out as a string of zeros and ones, thus, 0 is equal to 0; 1 = 1; 2 = 10; 3 = 11; 4 = 100; 5 = 101 and so on. If you look at it closely, you will see a pattern…

The conversion is achieved by connecting each of the buttons on the key-pad to 8 terminals that are wired to produce the following outputs: 0 = 00000000; 1 = 00000001; and so on. In electrical term, a “0” means there is no voltage and a “1” means there is voltage.

After conversion, the base two codes are transferred to the memory – the kind described last week – and also displayed on the screen. Each number requires 8 “relays” of memory. In electronics, this is termed as 8 “bits” or one “byte”.

If you observe the calculator screen carefully, you will notice that it is made up of lights arranged in the shape of the figure “8”. Each section of the figure is an individual light that either comes on or stays off in order to display the selected number. Thus, even though a number like “7” can be displayed, it is actually a sequence of lights that are either on (meaning “1”) or off (meaning “0”).

Once a number is keyed-in, the next step is selecting the mathematical function to be applied. That is, plus, minus, divide etc. Every calculation is carried out one bit at a time, in the same way that we do it manually one digit at a time.

The computation is achieved by simply connecting relay circuits that yield the desired result (OK; engineering students will tell you that it is not “simple”!). When the “=” key is pressed, the answer is transferred back to the memory and also displayed on the screen.

I hope that was “layman’s language” enough for Daniel Kungu. His other question was about different countries’ currencies – he wanted to know what makes one stronger than another.

The strength of a country’s currency is determined by the balance of its imports and exports. If the imports outweigh exports the currency weakens and vice versa.

However, the fact that currency A can buy many units of currency B does NOT mean that A is stronger than B. For example, you need about Sh60 to buy 100 Japanese yen. That is one Kenyan shilling buys 1.7 Yen. Does that make the shilling stronger than the yen?

 
     
  Back to 2008 Articles  
     
 
World of Figures Home About Figures Consultancy