Sunday, July 17, 2022

Digital Computer Primer Part 1

 A Modern Marvel that needs understanding 


It is the year 1995. Mr. 'X' steps into a railway booking office located in a distant village, far from the city, to book his reservation. There are not many people around. A few TV screens display the updated reservation position. Thus Mr. 'X' can study the alternatives and decide how best to reach his destination. He fills up the reservation forms and approaches the clerk at the counter. The man just touches a few keys on a typewriter-like gadget attached to a television set like screen, and the ticket comes out of an adjoining machine with the exact change. Mr 'X' comes out satisfied and recalls those days a decade ago when he had to stand in a queue for hours together for a ticket. But that marvel of modern technology, the Computer, has made all the difference. 

The computer in the railway booking office is the digital computer. Ever since man began to count and to do simple arithmetic, he has tried to make the process even simpler, faster and more accurate by the use of aids. From counting on his fingers, he progressed to use pebbles representing numbers and this led to the invention of the Abacus, a calculating frame with balls sliding on wires in grooves, still in use.

The precursor of the modern digital computer was designed by Charles Babbage as early as 1837. Further research and experimentation went on in the US and in Europe and the first calculating machine was developed by Prof. Howard Aiken of Harvard in 1944. This machine, a huge mechanical calculator, incorporating about 3000 telephone relays, was 50 ft. long and 8 ft. high. It took 4 seconds to do a multiplication exercise involving a few digits.

The first generation of machines, beginning with Prof. Aiken's calculator, was based on vacuum tube valve circuits. The development of transistors and other semiconductor devices led to the second generation of computers. Around 1965, the replacement of transistors by integrated circuits resulted in third generation computers. With each stage in the advancement of technology, computers have become smaller and more powerful, a factor which led to great increases in the ratio of performance to cost.

Digital computers work with binary numbers, a number system having a base of two (2), NOT TEN (10) as in the conventional decimal system we use in daily life. In the decimal system, there are 10 basic digits - 0 to 9. Any number, however large it may be, is a combination of these basic digits. In the binary number system, there are two basic digits - 0 and 1. Any number is represented by a string of 0s and 1s. Immediately the reader becomes intrigued ! How the binary system , using only 0 and 1 represent a number like 9, 52 or one as large as 1257 or even larger ? A simple example will clear this point. In both the systems, significance of a digit depends on its position in the string - e.g. if you have Rs. 1,000,000, you are a millionaire ; but if you have Rs.0,000,001, you have only one rupee. One may note that the digits are the same but their respective positions in the string make all the differences.

In the decimal system, the weightage of the extreme right digit is 1 and the weightage increases 10 times at every step as we proceed to the left. Thus, 123 is actually equivalent to 1x100+ 2x10 +3x1 = 123. Doubt ! No way. This is, how it works, most fundamental concept which cannot be reduced to anything simpler. Since binary system has only two digits, the system's weightage factor is 2. Thus a binary number 1001 is equivalent to decimal 9. How ? Note the conversion tricks. The rightmost digit's weightage is 1 and as you proceed to the left the weightage increases two folds at each step like 1,2,4,8,16,32.....  Following this rule let's see how binary string 1001 forms 9. 1001 = 1x8 + 0x4 +0×2 + 1×1. The binary system has a great advantage for use in digital computers. It can be implemented in practice by a simple two- way switch. A switch has two stable positions or states. It can be 'ON' (passing current) or 'OFF' (not passing current). In electronic computers, this switching device is a tiny transistor.  If a '1' is represented in a circuit by a device in its 'on state and a '0' by its 'off' state, any binary number can be represented by a combination of switches which are on or off to correspond with the binary digits of the number. In computer terminology the term binary digit is abbreviated as bit A string of eight binary digits forms a byte and a group of two or four bytes is commonly known as a computer word.

The formation of any number using binary digits is well understood.  What about English letters, punctuation marks, and other symbols ? These too can be coded using binary numbers. We can form four combinations, each unique, out of only two binary digits, say A and B. Their values can assume as follow : (1) A=0, B=0, (2) A=0, B=1, (3) A=1, B=0 and (4) A=1, B=1. With three digits 8 combinations are possible and as a general rule, we can say that the number of combinations is equal to 2^n (two raised to the power 'n') where 'n' is the number of digits involved. At best 128 unique codes are needed to represent English alphabets, both lower and upper cases, punctuation marks and other symbols. Hence a string of seven bits are enough to represent any of the said items.

A computer configuration consists of five main sections : memory, control unit, arithmetic and logic unit, and input & output units. These items housed in proper casings are termed Hardware. So in a computer installation one commonly finds a set of cabinets of physical dimensions, built out of metal sheets, a few screens and a few typewriter-like gadgets. Each is a piece of hardware. The information that is to be processed is Data and the programmes that instruct the machine in its operation are known as Software. It is the software which tames this powerful giant and controls its activities. 

The computer communicates with its users through the Input/Output units (I/O units). It receives information through input devices such as Card readers, Optical or Magnetic character readers or the Keyboard of a terminal and after computation, produces meaningful output on Printers, Screen of a Terminal or a Plotter. Magnetic tape and Magnetic discs are used for both input and output. The most popular and and simple to use I/O unit is a computer terminal.

A digital computer works with electrical signals in the form of pulses. The presence of a pulse in the circuit represents a binary '1' and its absence represents a zero. Holes punched on cards represents numbers, letters or symbols. The card reader senses the pattern of holes and converts them into appropriate pulses through electronic circuits. This is also the case with the keyboard. Whenever a key is hit, the corresponding symbol gets into the system in the form of pulses. There is a way to change electrical pulses into numbers, letters, etc., so that people can understand the results of the computer's work. The circuits in the Output unit make these conversions and supply users with the relevant information. Commonly used Output devices are Screens and Line printers so called because they print one complete line at a time. The speed of a card reader is about 1200 cards per minute and that of a line printer may be as high as 2000 lines per minute. Output can be generated in the form of graphs, diagrams and maps on automatic plotter.

The control unit and the arithmetic and logic unit (ALU) are physically combined to make up the Central Processing Unit (CPU).  Although the CPU controls the activities of the entire system, its most vital link is with the memory, so called as it memorises or stores information received from the input unit. It also stores programmes. These are series of instructions, each coded with strings of 0s and 1s and stored in the memory.




.

2 comments:

anirban said...
This comment has been removed by the author.
anirban said...

stylishly written with literary elegance while being technically very perfect