Sunday, 18 November 2018

Basic Computer Organization

➤ 1.1 Introduction:

Today computer are used in almost all walks of life: bank, hospital, school, shop, libraries, factories, courts, universities, prisons,etc.Computer buyers consider a number of factors, before choosing a product ,such as good performance,low cost,easy programmability, low maintenance cost,less downtime, etc.
   The design of a computer is highly sophisticated and complex.Over the years, a variety of concepts and techniques have been applied in designing and building it. 

➤1.2 Man and computing

The word computing means 'an act of calculating'. The human race has so far seen three different types of computing:
1. Fully manual computing using brain and fingers.
2. Manual computing using simple tools such as slide rule , abacus, etc.
3. Automatic computing using a computer.

   
 ➤ Characteristics of a Computer:

The main characteristics of a computer are listed below:
1.Very high speed of computation
2.Consistency of behavior ,unaffected by fatigue, boredom,like and dislike,etc.
3.Large storage capacity .
4.High accuracy of computation.
5.General purpose machine which can be programmed as per user's requirement.

➤Digital computer :

Most of the present day computers digital computers though some are also analog computers. An analog computer monitors (senses) input signals whose values keep changing continuously. physical variables such voltage, pressure, temperature, speed, etc. A digital computer operates on discrete (digital) information such as numbers. It uses binary number system in digits 0 and 1. Each is called a bit (binary digit), Annexure I discusses the different number systems: decimal, binary, octal and hexadecimal. The digital computer is designed using digital circuits which there are two different an input or known as logic 0 and 1. The mode arithmetic (mathematical) and logical operations on data and generates a result output signal. These two levels are rn computer is a digital computer capable of performing arithmetic (mathematical) and logical operations on data and generates a result.

➤Program:

The computer behaves as directed by the 'program' developed by the programmer. To solve a problem, the user inputs a program to the computer .The program has a sequence of instructions which specify the various operations to be done. Thus, the program gives a step-by-step method to solve a problem. A computer can carry out a 
variety of instructions such as ADD SUBTRACT, etc. The entire list of instructions for a computer is known as instruction set. A program uses combinations of the instructions according to the  method (algorithm) to solve the problem.A program can be defined as a sequence of instructions with appropriate data for solving a problem.The computer analyses each instruction and performs action on data.

➤Machine language program:

The digital computer is an electronic machine, Hence, the computer program should consist of only 1's and 0's. The operations are specified in the instructions as binary information. The operands (data) are given as binary numbers Such a program is called a machine language program. Though it is tedious to write programs in machine language, all early programs were written in machine language as there was no other choice. Different computer models had different machine languages and hence, a machine language program for one computer can not run on any other computer with different instruction set. Present day programmer uses high level languages due to simplicity of the high level languages. A high level language program consists of statements whereas a machine language program bas instructions. The computer converts the statements into instructions.


➤Application Software and System Software:

Computer software is classified into two types: application software and system software. An application program is a program for solving an users problem. Some typical examples are: payroll program, inventory control program, tax calculator, class room scheduler, library management software, train reservation software, billing software and game programs. Each of these programs is an application program since its object specific application (user requirement). A system program is a program which deficient utilization of the system by other programs and the users. It is generally developed for a given type of computer and it is not concerned with specific application or user. The operating system and compiler are examples of system software. Annexure 2 provides additional information regarding various types of application software and system software.


➤Stored Program Concept :               

 All modern computers use the stored program concept which was initially conceived by the design team of ISA computer led by Von Neumann. Hence, it is commonly known as Von Neumann concept. The essentials of stored program concept are as follows- 
l. The computer has five different types of units: memory, ALU, control unit, input unit and output unit

2. The program and data are stored in a common memory. 

3. Once a program is in memory, the computer can execute it automatically without manual intervention. 

4. The control unit fetches and executes the instructions in sequence one by one. This sequential execution can be modified by certain type of instructions.

5. An instruction can modify the contents of any location in memory. Hence, a pro- gram can modify itself, instruction-execution sequence also can be modified.


➥Main Memory and Auxiliary/Primary memory:

 The memory from which the CPU fetches the instructions is known as main memory or primary memory. Hence, to run a program, it has to be brought into the main memory. The auxiliary memory is external to system nucleus and it can store large amount of programs and data. The CPU does not fetch instructions of a program in the auxiliary memory Several programs are stored in an auxiliary memory and the program that should be executed is brought into the main memory (Fig.). The auxiliary memory is cheaper compared to main memory and hence a computer generally has limited amount of main memory and large amount of auxiliary memory. The auxiliary memory is also known as scondary storage Figure 1.14 lists several types of auxiliary memory. These are connected to the computer as Input-Output (I/O) devices.


➧Device Controller:

A peripheral device is linked to the system nucleus (CPU and memory) by a device control ler, also known as I/O controller. Figure shows different device controllers. The main function of a device controller is transfer of information (program and data) between the system nucleus and the device Physically, a device controller can exist in three different forms: as a separate unit, as integrated with the device, as integrated with CPU. A basic device controller has five sections as shown in It communicates with a device through the device interface that carries the signals between a device controller and a de- vice. All device controllers communicate with CPU or memory through the system inter face  The system interface is identical to all device controllers.
Device interface and system interface
Common device Controller




➤Device Interface Signals:

 There are three types of signals between a device and a device controller: data, control signals and status signals The control signals are issued by the device controller demanding certain actions by the device. For example, the get reset, i.e., clear the internal condition inside the device. The status RESET signal asks the device to signals are sent by the I/O device reporting certain internal condition to the devices controller For example, the ERROR signal reports that there is an error in the device. The data signals may be sent either serially, on one wire, bit-by-bit or in parallel on eight wires, carrying all eight hits of a byte simultaneously

                                                                             Parallel interface


➥I/O Drivers:

An I/O driver for a device consists of routines for performing various operations: read, write etc. Each routine gives appropriate commands to the 1/0 controller and the device device. To support a device in a system, controller issues necessary control signals to the three items are required 
1. A device controller which logically interfaces the device to the system nucleus. 
2. A device interface cable which physically connects the device to the device controller. ,  3.An I/O driver.
 An I/O driver (device driver) is a collection of I/O routines for various operations for a specific I/O device. It takes care of issuing commands to a device controller, verifying the status of the device controller and device and handling input/output operations. The operating system and other program use the device  driver routines for doing I/0 operations. The I/O driver is a system program which can be asked by any other program to 'server ' The I/O drivers of all the I/O devices are collectively known as BIOS.


➤Main Memory :

The memory stores instructions, data and results of the current program being executed by the CPU. It is called program memory since the CPU fetches instructions only from this memory. The main memory is functionally organized as a number of locations. Each location stores a fixed number of bits.

The term word length of a memory indicates the number of bits in each location. The total capacity of a memory is the number of locations multi- plied by the word length. Each location in memory is identified by a unique address as shown in two different memories with the same capacity may have different organization as illustrated by Both have same capacity of 4 kilo bytes but they differ in their internal organizations.

                                                        Main memory location

                                              Memory capacity and organisation


➤Access Time and Cycle Time:


The time taken by the memory to read the contents of a location (or write information into a location is called its access time Generally, main memory should have uniform access time for all its locations irrespective of its address (first, middle, last, etc.). Modern computers use semiconductor memory whose access time is around 50 ns. Old computers use magnetic core memory whose access time was around I gs. After the access is over, the memory needs setting time after which the next access can be started. The settling time for semiconductor and core memory are in the order of 10 and 200 ns, respectively. The cycle time is the minimum time interval from the beginning of one access to the beginning of next access. It is the sum of access time and settling time.

➥Random Access Memory (RAM):

 A memory which has equal access time for all its locations is called a Random Access Memory (RAM), Both semiconductor memory and magnetic core memory are RAM. Though core memory has become obsolete, its non-volatile nature is interesting. The semi- conductor memory is volatile: its contents are lost when power supply is removed.

➥Read Only Memory (ROM):

In a modern computer, usually a small part of the main memory is a Read Only Memory ROM). The CPU can read from the ROM but cannot write into it. Generally, some permanently required control programs and BIOS are stored in ROM by the manufacturer

➥Memory Operations:

The CPU addresses the memory both for a memory read operation and for a memory write operation. During a memory read operation, the CPU first sends the address of the location and then sends the memory read signal On receiving the memory read signal, the memory starts reading from the location pointed by the address. After the access time, the content of the location is put by the memory on the data lines (Fig. 1.23). During a memory write operation, the CPU first sends the address of the location and then sends the data to be written and the memory write signal (hg 124). On receiving the memory write signal, the memory starts writing operation in the location corresponding to the ad- dress. Till the access time is over, the memory is busy with the write operation.

Memory read operation

CPU uses two registers for communication with memory .During read/write operations, the CPU puts the memory address in Memory Address Register (MAR). The Memory Buffer Register (MBR) is used to store the data from CPU during a write operation and the data from memory during a read operation. The MBR may be also called Memory Data Register (MDR).

Memory write operation

➥Asynchronous and Synchronous Memory Interface :

Two types of CPU-memory interfaces are implemented in different computer systems synchronous and asynchronous. In synchronous interface, the time taken by the memory for read/write operation is known to the CPU. 

Synchronous memory interface


➥Memory Addressability :

The number of bits address determines the maximum number of memory address possible for the CPU. Suppose a CPU has n bits in the address, its memory can have a maximum of 2" (2 to the power of n locations. This is known as the CPU's memory addressability. It gives theoretical maximum memory capacity for a CPU in practice physical memory size is less than this due to cost consideration. 



➥CPU Operational Concepts:

The function of the CPU is executing the program stored in the memory, For doing this, the CPU fetches one instruction at a time, executes it and then takes up next instruction. This action is done repeatedly and is known as instruction cycle. As shown in he instruction cycle consists of two phases: fetch phase and execute phase. In fetch phase, an instruction is fetched from memory. In execute phase, the instruction is analysed and 
relevant operations are performed .

➥Instruction Format and Instruction Cycle:

 The general format of an instruction in shown in. The operation code (opcode field identifies the operation specified and the operand field indicates the data. Generally the operand field gives the address of the memory location where the operand (data) is stored. The complete sequence involved for the fetch and execute phases of one instruction is known as instruction cycle. Consider an ADD instruction whose format is shown in hit pattern in the opcode field identifies it as an ADD instruction.The other two fields identify the location where the two operands (data) are available. gives the steps involved in the instruction cycle defines each step shows the formats of three more simple instructions: JUMP, NOOP and HALT

Instruction cycle steps for ADD



       

4 comments: