CO Unit 1 Chap 1 Notes
CO Unit 1 Chap 1 Notes
CO Unit 1 Chap 1 Notes
CHAPTER 1
Computer Organization and Architecture mainly deals with the computer Hardware and
Computer Architecture.
List of instructions are called programs & Internal storage is called computer memory.
Computer Types:
There are many types of computers based on the size, cost, computational power etc.
1. Personal computers: This is the most common type of computers found in homes,
schools, Business offices etc.
i. Desktop Computers:
Computer having a processing or a storage unit, visual display unit, audio unit, input units
that can all be located on a desk of a home or an office.
2. Work stations: These have high resolution input/output (I/O) graphics capability, but
with same dimensions as that of desktop computer. These are used in engineering
applications of interactive design work.
Example: GPUs, System used in medical applications like Ultrasound, CT Scan etc.
3. Enterprise systems and Servers: Enterprise systems are used for business data processing
in medium to large corporations that require much more computing power and storage
capacity than work stations.
Example: ATM Machine
Servers: These are the ones which can handle large volume of requests to handle data. Here,
the requests and responses both are transferred through network.
Example: File Servers, DB Servers
Prepared By: Sapna S and Sandhya S, Department of ISE, NMAMIT, Nitte Page 1
Computer Organization and Architecture - Unit 1 Chapter 1
4. Super Computers: These are used for large scale numerical calculations required in the
applications like weather forecasting etc.
FUNCTIONAL UNITS
1) Input Unit
2) Memory Unit
3) Arithmetic and Logic Unit
4) Output Unit
5) Control Unit
A computer consists of five functionally independent main parts input, memory, arithmetic
logic unit (ALU), and output and control unit.
Input device accepts the coded information as source program i.e. high level language. This is
either stored in the memory or immediately used by the processor to perform the desired
operations. The program stored in the memory determines the processing steps. Basically the
computer converts one source program to an object program. i.e. into machine language.
Finally the results are sent to the outside world through output device. All of these actions are
coordinated by the control unit.
Input unit:
Computers accept coded information through input units, which read the data. Whenever a
key is pressed, the corresponding letter or number is translated into its equivalent binary code
and transmitted over a cable to either memory or processor. Keyboard is the most well-
known input device. Joysticks, trackballs, mouse, scanners etc are other input devices.
Prepared By: Sapna S and Sandhya S, Department of ISE, NMAMIT, Nitte Page 2
Computer Organization and Architecture - Unit 1 Chapter 1
Memory unit: Its function is to store programs and data. The memory unit is broadly
classified into two classes.
1) Primary memory: - It is a fast memory that operates at electronic speeds. Programs must
be stored in this memory while they are being executed. The memory contains a large
number of semiconductors storage cells, each capable of storing one bit of information.
These are processed in a group of n bits called a word. To provide easy access to a word
in memory, an unique address is associated with each word location.
Addresses are numbers that identify memory location. Number of bits in each word is
called word length of the computer. Programs must reside in the memory during
execution. Instructions and data can be written into the memory or read out under the
control of processor.
The time required to access one word in called Memory Access Time.
Main memory is the largest and the slowest part of the primary memory and cache
memory is smaller and faster RAM unit which resides in the processor chip.
2) Secondary memory: - It is used when large amounts of data & programs have to be
stored, particularly information that is accessed infrequently. Examples: - Magnetic disks
& tapes, optical disks (i.e. CD-ROM’s), floppies etc.
Output unit:
These actually are the counterparts of input unit. Its basic function is to send the processed
results to the outside world.
Examples: Printer, speakers, monitor etc.
Control unit:
It is effectively the nerve center that sends signals to other units and senses their states. The
actual timing signals that govern the transfer of data between input unit, processor, memory
and output unit are generated by the control unit. Timing signal are signals that determine
when a given action is to take place.
Prepared By: Sapna S and Sandhya S, Department of ISE, NMAMIT, Nitte Page 3
Computer Organization and Architecture - Unit 1 Chapter 1
This instruction adds the operand at memory location LOCA, to operand in register R0 &
places the sum into register R0. This instruction requires the performance of several steps.
1. First the instruction is fetched from the memory into the processor.
2. The operand at LOCA is fetched and added to the contents of R0.
3. Finally the resulting sum is stored in the register R0.
The preceding Add instruction combines a memory access operation with an ALU
Operations. In some other type of computers, these two types of operations are performed by
separate instructions for performance reasons.
Load LOCA, R1
Add R1, R0
Transfers between the memory and the processor are started by sending the address of the
memory location to be accessed to the memory unit and issuing the appropriate control
signals. The data are then transferred to or from the memory.
The Fig 1.2 shows how memory & the processor can be connected. In addition to the ALU &
the control circuitry, the processor contains a number of registers used for several different
purposes.
The Instruction Register (IR): Holds the instruction that is currently being executed. Its
output is available for the control circuits which generates the timing signals that control the
various processing elements in one execution of instruction.
The Program Counter (PC): This is another specialized register that keeps track of
execution of a program. It contains the memory address of the next instruction to be fetched
and executed.
Besides IR and PC, there are n-general purpose registers R0 to Rn-1. The other two registers
which facilitate communication with memory are:
1. MAR (Memory Address Register): It holds the address of the location to be
accessed.
2. MDR (Memory Data Register): It contains the data to be written into or read out of
the address location.
Prepared By: Sapna S and Sandhya S, Department of ISE, NMAMIT, Nitte Page 4
Computer Organization and Architecture - Unit 1 Chapter 1
Prepared By: Sapna S and Sandhya S, Department of ISE, NMAMIT, Nitte Page 5
Computer Organization and Architecture - Unit 1 Chapter 1
Prepared By: Sapna S and Sandhya S, Department of ISE, NMAMIT, Nitte Page 6
Computer Organization and Architecture - Unit 1 Chapter 1
BUS STRUCTURE
• A bus is a group of lines that serves as a connecting path for several devices.
• A bus may be lines or wires.
• There are three categories of Buses.
1. Data Bus : Data Bus carries the data.
2. Address Bus: Address Bus carries the address.
3. Control Bus: Control Bus carries the control signals.
• There are 2 types of Bus structures: 1) Single Bus Structure and 2) Multiple Bus
Structure.
It is the simplest way to connect the units where all the units are connected to a single bus.
Because the bus can be used for only one transfer at a time, only 2 units can actively
use the bus at any given time.
Bus control lines are used to arbitrate multiple requests for use of the bus.
Advantages:
Low cost
Flexibility for attaching peripheral devices.
Disadvantages:
No concurrency in operations
Prepared By: Sapna S and Sandhya S, Department of ISE, NMAMIT, Nitte Page 7
Computer Organization and Architecture - Unit 1 Chapter 1
The devices connected to a bus vary widely in their speed of operation. To synchronize their
operational-speed, buffer-registers can be used.
Buffer Registers
Are included with the devices to hold the information during transfers.
Prevents a high-speed processor from being locked to a slow I/O device during data
transfers.
PERFORMANCE
The most important measure of performance of a computer is how quickly it can execute
programs.
1. Instruction-set.
2. Hardware & the technology in which the hardware is implemented.
3. Compiler: Because programs are usually written in a High level language,
performance is also affected by the compiler that translates programs into machine
language.
• For best performance, it is necessary to design the compiler, machine instruction set
and hardware in a co-ordinated way.
Let us examine the flow of program instructions and data between the memory & the
processor.
• At the start of execution, all program instructions are stored in the main-memory.
Prepared By: Sapna S and Sandhya S, Department of ISE, NMAMIT, Nitte Page 8
Computer Organization and Architecture - Unit 1 Chapter 1
• As execution proceeds, instructions are fetched into the processor, and a copy is
placed in the cache.
• Later, if the same instruction is needed a second time, it is read directly from the
cache.
• A program will be executed faster if movement of instruction/data between the main-
memory and the processor is minimized and this can be achieved by using the cache.
PROCESSOR CLOCK
Let T be the Processor time required to be executed a program written in high level language.
Let N be the actual number of machine language instructions to be executed to complete the
program execution.
Let S be the average number of basic steps needed to execute one machine instruction.
To achieve high performance, the computer designer must reduce the value of T, which
means reducing N and S, and increasing R.
The value of N is reduced if source program is compiled into fewer machine
instructions.
The value of S is reduced if instructions have a smaller number of basic steps to
perform.
The value of R can be increased by using a higher frequency clock.
Prepared By: Sapna S and Sandhya S, Department of ISE, NMAMIT, Nitte Page 9
Computer Organization and Architecture - Unit 1 Chapter 1
Care has to be taken while modifying values since changes in one parameter may affect
the other.
CLOCK RATE
Hence, much of performance-gain expected from the use of faster technology. The value of T
will be reduced by same factor as R is increased because S & N are not affected.
PERFORMANCE MEASUREMENT
• Benchmark refers to standard task used to measure how well a processor operates.
• The Performance Measure is the time taken by a computer to execute a given
benchmark.
• SPEC selects & publishes the standard programs along with their test results for
different application domains. (SPEC - System Performance Evaluation Corporation).
• SPEC Rating is given by:
• SPEC rating = 50 indicate that the computer under test is 50 times as fast as reference-
computer.
• The test is repeated for all the programs in the SPEC suite. Then, the geometric mean
of the results is computed.
• Let SPECi = Rating for program ‘i' in the suite.
Prepared By: Sapna S and Sandhya S, Department of ISE, NMAMIT, Nitte Page 10
Computer Organization and Architecture - Unit 1 Chapter 1
RISC (Reduced Instruction Set Computer) CISC (Complex Instruction Set Computer)
Simple Instructions taking one cycle Complex Instructions taking multiple cycles
Only load/store instructions refer to memory Any instruction refers to memory
Fixed format Instruction (fixed number of Variable format Instruction (variable no. of
bytes) bytes)
Supports small number of instructions Supports Large number of instructions
Supports More registers Supports Less registers
Fewer Addressing Modes Several Addressing modes
Highly pipelined Very less or not pipelined
Uses Hardwired Control Unit Uses micro-programmed Control Unit
Prepared By: Sapna S and Sandhya S, Department of ISE, NMAMIT, Nitte Page 11