The basic function of computer is to execute program, sequence of instructions. These instructions are stored in the computer memory. The instructions are executed to process data which already loads in to computer memory through input unit. After processing the data, the result is either stored back in to the computer memory for further reference or it is sent to the outside world through the output port.
The computer consists of five functionally independent units:
1. Input
2. Memory
3. Arithmetic and logic
4. Output
5. Control unit
Therefore, all functional units of the computer contribute to execute a program. Let us summarize the functions of different computer units.
The input unit accepts the digital information from user with the help of input devices such as keyboard, mouse, microphone etc. The input unit accepts data and instructions from the outside world to machine. It is operated by control unit. The information received from the input unit is either stored in the memory for later use or immediately used by the arithmetic and logic unit to perform the desired operations. The program stored in the memory decides the processing steps and the processed output are sent to the user with the help of output devices or it is stored in the memory for later reference. The memory unit stores both, data and instructions. All the above mentioned activities are coordinated and controlled by the control unit. The arithmetic-logic unit performs arithmetic and logical operations. The control unit transmits final results and messages to the outside world.
The arithmetic and logic unit in conjunction with control unit is commonly called central processing unit (CPU). Let us discuss the functional units in details.
1. Input Unit
A computer accepts digitally coded information through input unit using input devices. The most commonly used input devices are keyboard and mouse. The keyboard is used to position the screen cursor and therefore enter the information by selecting option. Apart from keyboard and mouse there are many other input devices are available, which include joysticks, trackball, space ball, digitizers and scanner.
2. Memory Unit
The memory unit is used to store programs and data. Usually, two type’s memory devices are used to form a memory unit: Primary memory device and Secondary storage memory device. The primary storage, commonly called main memory is a fast memory used for the storage of programs and active data (the data currently in process). The main memory is a semiconductor memory. It consists of large number of semiconductor storage cells, each capable of storing one bit information. These cells are read or written by central processing unit in a group of fixed size called word. The main memory is organized such that the contents of one word, containing n bits, can be stored or retrieved in one write or read operation, respectively.
To access data from a particular word from main memory each word in the main memory has a distinct address. This allows accessing any word from the main memory by specifying corresponding address. The number of bits in each word is referred as the word length of the computer. Typically, the word length varies from 8 to 64 bits. The number of such words in the main memory decides the size of memory or capacity of the memory. This is one of the specifications of the computer. The size of computer main memory varies from few million words to tens of millions words.
An important characteristic of a memory is an access time (the time required to access one word). The access time for main memory should be as small as possible. Typically, it is of the order of 10 to 100 nanoseconds. This access time also depends on the type of memory. In randomly accessed memories (RAMs), fixed time is required to access any word in the memory. However, in sequential access memories this time is not fixed.
The main memory consists of only randomly accesses memories. These memories are fast but they are small in capacitates and expensive. Therefore, the computer uses the secondary memories such as magnetic tapes, magnetic disks for the storage of large amount of data.
3. Arithmetic and Logic Unit
The arithmetic and Logic unit (ALU) is responsible for performing arithmetic operations such as add, subtract, division and subtraction, and logical operations such as ANDing, ORing, Inverting etc. To perform these operation operands from the main memory are brought in to the high speed storage elements called registers of the processor. Each register can store one word of data and they are used to store frequently used operands. The access times to registers are typically 5 to 10 times faster than access time to memory. After performing operation, the result is either stored in the register or memory location.
4. Output Unit
The output unit sends the processed results to the user using output devices such as video monitor, printer, plotter, etc. The video monitors display the output on the CRT screen whereas printers and plotters give the hard-copy output. Printers are classified according to their printing methodology: Impact Printers and non-impact printers. Impact printer’s press formed character faces against inked printers. Non impact printers and plotters use laser techniques, inkjet sprays, xerographic processes, electrostatic methods, and electro thermal methods to get images on to the paper. An inkjet printer is the example of non-impact printers.
5. Control Unit
As mentioned earlier, the control unit coordinated and control the activities amongst the functional units. The basic function of control unit is to fetch the instructions stored in the main memory, identify the operations and the devices involved in it, accordingly generate control signals to execute the devices involved in it, and accordingly generate control signals to execute the desired operations.
The control unit uses control signals or timing signals to determine when a given action is to take place. It controls input and output operations, data transfer between the processor, memory and input/output devices using timing signals.
The control and the arithmetic and logic unit of a computer are usually many times faster other devices connected to a computer system. This enables them to control a number of external input/output devices.