A computer has five functionally independent main parts:
- Input Unit
- Memory Unit
- Arithmetic and logic Unit
- Output Unit
- Control unit
Computers accept coded information through input units, which read the data. The most well-known input device is keyboard. Whenever a key is pressed, the corresponding letter or digit is automatically translated into its corresponding binary code and transmitted over a cable to either the memory or the processor.
The function of the memory unit is to store programs and data.
There are two classes of storage, called Primary and Secondary.
- Primary storage is a fast memory that operates at electronic speeds. Programs must be stored in the memory while they are being executed. Memory in which any location can be reached in a short and fixed amount of time after specifying its address is called Random Access Memory(RAM). The time required to access one word is called the Memory Access Time.
- Although Primary Storage is essential, it tends to be expensive. Thus additional, cheaper, secondary storage is used when large amounts of data and many programs have to be stored, particularly for information that is accessed infrequently. Ex:- magnetic disks and tapes and optical disks.
Arithmetic and Logic Unit:-
All the arithmetic or logic operation, is initiated by bringing the required operands into the processor, where the operation is performed by the ALU.
Its function is to send processed result to the outside world. Ex:- Printer.
The Control Unit is used to co-ordinate the operations of memory, ALU, input and output units. The Control Unit can be said as the nerve center that sends control signals to other units and senses their states.
Basic Operational Concepts
The computer works based on some given instruction. Let us consider an example:
Add LOCA, R0
-> This instruction adds the operands at memory location LOCA to the operand in the register R0 and places the sum into the register R0.It seems that this instruction is done in one step, but actually it internally performs several steps
->First, the instruction is fetched from the memory into the processor. Next, the operand at LOCA is fetched and added to the contents of R0.
The above instruction can be written also as-
Load LOCA, R1
Let us now analyse how the memory and processor are connected:-
The Processor contains a number of registers used for several purposes.
- IR: The IR(Instruction Register) holds the instruction that is currently being executed.
- PC: The PC(Program Counter) is another specialized register which contains the memory address of next instruction to be fetched.
- MAR: This register facilitates communication with the memory. The MAR holds the address of the location to be accessed.
- MDR: This register facilitates communication with the memory. The MDR contains the data to be written into or read out of the addressed location.
- There are n general purpose registers R0 to Rn-1.
- The Program execution starts when the PC is set to point the 1st instruction. The content of the PC is transferred to the MAR and Read control signal is sent to memory. Then the addressed word is read out of the memory and loaded into the MDR. Next the contents of the MDR are transferred to the IR. Then the program is decoded, it is sent to the ALU if it has some arithmetic or logical calculations. The n general purpose registers are used during this calculations to store the result. Then the result is sent to the MDR, and its address of location where result is stored is sent to MAR. And then a write cycle is initiated. Then PC is incremented and the process continues.
The Bus is used to connect all the individual parts of a computer in an organized manner. The simplest way to interconnect functional units is to use a single bus. The main advantage of the single bus structure is its low cost and its flexibility. The multiple bus achieve more concurrency in operation by allowing two or more transfers to be carried at the same time.
Multiprocessors and Multicomputers:-
A large computer system which contains a number of processor units is called Multiprocessor System. This systems either execute a number of different application tasks in parallel, or they execute subtasks of a single large task in parallel. The high performance of these systems comes with much increased complexity and cost.
The Multicomputer System is formed by interconnecting a group of complete computers to achieve high total computational power. They can access only their own memory. They communicate data by exchanging messages over a communication network.
- Performance means how quickly it can execute programs.
- For best performance, it is necessary to design the compiler, the machine instruction set, and the hardware in a coordinated way.
- Processor circuits are controlled by a timing signal called clock. The processor divides the action to be performed in basic steps, such that each step can be completed in one clock cycle.
- Basic Performance Equation is given by:- T=((NXS)/R) , Where N= actual no. of instruction executions , S= avg no. of basic step needed to execute one machine instruction , R- clock rate (cycles/sec)
- In order to achieve high performance, the T value should reduced which can be done by reducing N and S, or by increasing R.
- A Substantial improvement can also be done by overlapping the execution of successive instructions. This concept is known as pipelining.