Skip to main content

A6- HOW A SOFTWARE INSTRUCTION IS PROCESSED IN THE COMPUTER

 

By pragyansharma polavarapu

Let us explain in a very simple way the basic idea. Each “software instruction” consists of two well defined parts. The two parts are the OPCODE and the OPERAND.

(1) The OPCODE means the particular arithmetic operation . It is the electronic circuit in the ALU for operations like (+, - , X , / ,square,square root etc).

(2) The OPERAND . It is the arithmetic expression /numbers on which the mathematical operation (add/subtract/multiply/divide etc ) is to be done.

A “software instruction” involving mathematical work looks as shown below(in an extremely simple example). The first item in the “software instruction” is OPCODE . The second item is OPERAND.

Only after they get translated into 01010101 code (in a millionth of second),required OPCODE circuits (+,-, x etc )will be switched on . Then the OPERANDS will be transmitted through the current paths to the ALU in millionth of second. Simple examples are given below.

[add] [238 ]

[multiply ] [15 ]

[subtract] [ 1354 ]

[divide] [20 ]

THE ARITHMATIC AND LOGIC UNIT(ALU)

It is the most important part after the CPU. It is a group of inter-connected REGISTERS and contains the highly complicated (and once very costly) mathematical circuits.

The ALU contains the part called ACCUMULATOR which stores the intermediate answers .The ACCUMULATOR is like a water drum into which water is poured with a mug and the latest interim answer is indicated by the total number of mugs of water which “accumulated” in the drum. As a very simple example let us take following expression with 100 numers or even a million numbers.

6+8-5+3……

All calculations in Computer’s ACCUMULATOR starts with a “0” as the starting number for any calculation. So the progress in mathematical operations is as follows

0+6=6

6+8=14

14-5=9

9+3=12

and so on until the hundred or thousand or million numbers are operated upon.The work in the computer is so fast --(done by electron current flowing at speeds near 300,000 kilometers per second)---that such basic mathematical operations though a million in number go on and get completed in fraction of a second. But is really a”leisurly pace” for the computer!

The final end answer, is conveyed to the ‘OUTPUT’ i.e computer screen on orders from CPU. Computer never tires and never commits mistakes. If a wrong program is given,the computer gives an error message and stops working. Only after human operator rectifies mistake it again starts working.

DUTIES OF IMPORTANT REGISTERS.

Each register is like a highly trained specialist clerk. Let us examine duties performed by some registers.

(a) INSTRUCTION REGISTER (IR) :

 A SOFTWARE INSTRUCTION is first detained for a millionth of second in the IR. After decoding it is sent to another register.

( b )MEMORY DATA REGISTER (MDR): 

Here the mathematical data is temporarlily stored till CPU orders its transfer to next part. Here the “interim answer” is temporarily stored till orders are received from CPU for its next destination. The “FINAL ANSWER” coming from ALU is also temporarily stored here until CPU orders it to be sent to OUTPUT(computer screen).

( c )MEMORY ADDRESS REGISTER (MAR):

The serial numbers (DIGITAL ADDRESS) of all the SOFTWARE INSTRUCTIONS ( similar to the house number) are maintained here. MAR conveys serial number of next instruction to MAIN MEMORY, concerned REGISTERS/ALU etc .This system ensures utmost speed in processing software instructions one after another without any waiting.

( d ) PROGRAM COUNTER (PC) ---

It strictly ensures that software instructions are released as per their serial number and conveys the information in advance to MAIN MEMORY , other REGISTERS etc .

(e) THE ARITHMATICAL AND LOGIC UNIT –

It is the central mathematical section much like the mathematics teacher. It contains several costly mathematical and logic circuits and in importance next only to the CPU . Its functions are simply explained above already.

A SIMPLE EXAMPLE OF WORK IN ALU FROM A MATHEMATICAL VIEW.

The formula (equal to a software program) is “5a+4b=k”

The input data is as follows

Three values of a a=24, 79,64

Three values of b b=56, 26, 49

Answer K1 =(5x24)+(4x56)

Answer K2 =(5x79)+(4x26)

Answer K3 =(5x64)+(4x49)

Even a million sets of values of a and b are processed and solved in a millionth of second in a similar way and in a leisurely most perfect way .

Under instructions of CPU the REGISTERS and ALU work. The final answer is kept temporarily in MAIN MEMORY. On receiving instructions from CPU the final answer is sent to OUTPUT









Comments

Popular posts from this blog

G5-MYTHOLOGY--STORY OF A WICKED KING-2

By PragyanSharma Polavarapu Then a most wonderful thing happened . With unbearable and frightening thundering sounds the pillar broke vertically and out came a most frightening form jumping out of the pillar. It had a shining body drenching entire area in dazzling light. It had a heavy human body and a frightening angry head of a lion with wide open mouth and started roaring violently as if hungry . It searched for the frightened and shivering king and caught hold of him. It was far bigger than the dazed king who himself was of heavy build. It dragged the frightened king to the high threshold and with wild angry roars sat on the threshold, tore open the stomach of the king and started drinking the king's blood ! It was a most fearful sight! Even the gods who appeared there were too frightened to go near this angry lion form of Lord Vishnu. The boy too was frightened but gained his composure and sang hymns to the god. The angry lion- god cooled down after hearing the sweet voice of...

G10-THE TEMPLE AT PATHAGUTTA-2

By PragyanSharma Polavarapu THE ANCIENT ORIGINAL LORD NARASIMHA TEMPLE As mentioned earlier the area of Pathagutta temple is a vast stony surface formed by a series of big horizontally-lying boulders buried deep in the ground. Each boulder may perhaps be fifty meters long and only a little less wide! At some places two or three small room-size boulders are stacked one above the other by nature. Seeing the stacked boulders every person wonders how such gigantic stones were lifted at all. No humans can lift them. Simple rural people feel that it is nothing but one of god's great visible miracles. They feel that if they similarly arrange a little stack of stones one above another somewhere on the stony ground they surely would get god's grace. We can see scores of such tiny stone-stacks created with much devotion by devotees on the stony ground in isolated areas. Large numbers of people worship at pathagutta temple daily. The temple history says that Patha gutta was the ma...

G7-BOULDER RIDDEN HILLS-2

  By PragyanSharma Polavarapu A LITTLE OF GEOLOGY There are some gigantic bald hills (not boulders but entire hills)- --Bhongir hill, Yadadri hill,Hanamkonda "Ekasila" hill (Warangal district) etc. Let us learn how the bald hills i.e. single stone dome hills of colossal size are formed. Scientists say that such hills are among the oldest hill types in the world and were created hundreds of millions of years ago. Scientists say that age of earth may be around 4500 million years i.e. 450 crore years! At that early time, the outer stone layers of earth (crust layers) were very soft like wheat flour dough but extremely hot. Scientists say that lying under this soft bending “plastic” outer stone layer --( extending for thousands of square miles in area on earth’s surface at that time)--- ,there was another extremely hard stone mass which did not soften and bend. This underlying hard stone mass pushed up the soft outer layers .This was a very slow process taking tens of millions...