Input unit accepts coded information from human operators, from electromechanical devices such as keyboards, or from other computers over digital communication lines. The information received is either stored in the computers memory for later reference or immediately used by the arithmetic and logic circuitry to perform the desired operations. The processing steps are determined by a program stored in the memory. Finally the results are sent back to the outside world through the output unit. All of these actions are coordinated by the control unit. The list of instructions that performs a task is called a program. Usually the program is stored in the memory. The processor then fetches the instruction that make up the program from the memory one after another and performs the desire operations. 1.1 Input Unit: Computers accept coded information through input units, which read the data. 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. Some input devices are Joysticks Trackballs Mouses Microphones (Capture audio input and it is sampled & it is converted into digital codes for storage and processing). 1.2.Memory Unit: It stores the programs and data. There are 2 types of storage classes Primary Secondary Primary Storage: It is a fast memory that operates at electronic speeds. Programs must be stored in the memory while they are being executed. The memory contains large no of semiconductor storage cells. Each cell carries 1 bit of information. The Cells are processed in a group of fixed size called Words. To provide easy access to any word in a memory,a distinct address is associated with each word location.
Addresses are numbers that identify successive locations. The number of bits in each word is called the word length. The word length ranges from 16 to 64 bits. There are 3 types of memory.They are RAM(Random Access Memory) Cache memory Main Memory RAM: Memory in which any location can be reached in short and fixed amount of time after specifying its address is called RAM. Time required to access 1 word is called Memory Access Time. Cache Memory: The small,fast,RAM units are called Cache. They are tightly coupled with processor to achieve high performance. Main Memory: The largest and the slowest unit is called the main memory. 1.3. ALU: Most computer operations are executed in ALU. Consider a example, Suppose 2 numbers located in memory are to be added. They are brought into the processor and the actual addition is carried out by the ALU. The sum may then be stored in the memory or retained in the processor for immediate use. Access time to registers is faster than access time to the fastest cache unit in memory. 1.4. Output Unit: Its function is to send the processed results to the outside world. eg.Printer Printers are capable of printing 10000 lines per minute but its speed is comparatively slower than the processor. 1.5. Control Unit: The operations of Input unit, output unit, ALU are co-ordinate by the control unit. The control unit is the Nerve centre that sends control signals to other units and senses their states. Data transfers between the processor and the memory are also controlled by the control unit through timing signals. The operation of computers are, The computer accepts information in the form of programs and data through an input unit and stores it in the memory.
Information stored in the memory is fetched, under program control into an arithmetic and logic unit, where it is processed. Processed information leaves the computer through an output unit. All activities inside the machine are directed by the control unit. BASIC OPERATIONAL CONCEPTS: The data/operands are stored in memory. The individual instruction are brought from the memory to the processor, which executes the specified operation. Eg:1 Add LOC A ,R1 Instructions are fetched from memory and the operand at LOC A is fetched. It is then added to the contents of R0, the resulting sum is stored in Register R0. Eg:2 Load LOC A, R1 Transfer the contents of memory location A to the register R1. Eg:3 Add R1 ,R0 Add the contents of Register R1 & R0 and places the sum into R0. Fig:Connection between Processor and Main Memory Instruction Register(IR) Program Counter(PC)
Memory Address Register(MAR) Memory Data Register(MDR) Instruction Register (IR): It holds the instruction that is currently being executed. It generates the timing signals. Program Counter (PC): It contains the memory address of the next instruction to be fetched for execution. Memory Address Register (MAR): It holds the address of the location to be accessed. Memory Data Register (MDR): It contains the data to written into or read out of the address location. MAR and MDR facilitates the communication with memory. Operation Steps: The program resides in memory. The execution starts when PC is point to the first instruction of the program. MAR read the control signal. The Memory loads the address word into MDR.The contents are transferred to Instruction register. The instruction is ready to be decoded & executed. Interrupt: Normal execution of the program may be pre-empted if some device requires urgent servicing. Eg...Monitoring Device in a computer controlled industrial process may detect a dangerous condition. In order to deal with the situation immediately, the normal execution of the current program may be interrupted & the device raises an interrupt signal. The processor provides the requested service called the Interrupt Service Routine(ISR). ISR save the internal state of the processor in memory before servicing the interrupt because interrupt may alter the state of the processor. When ISR is completed, the state of the processor is restored and the interrupted program may continue its execution.