Chapter 1 (Comp Arc)
Chapter 1 (Comp Arc)
INTRODUCTION TO
COMPUTER ARCHITECTURE AND ORGANIZATION
1
COMPUTER ARCHITECTURE-Defn-1
• Computer Architecture deals with the functional
behavior of a computer system as viewed by a
programmer.
• This view includes aspects such as the sizes of data
types (e.g.using 16 binary digits to represent an
integer),and the types of operations that are
supported(like addition, subtraction, and subroutine
calls).
• Computer architecture describe the attributes of a
system as seen by the programmer, i.e.
• The conceptual structure and functional behavior
as distinct from the organization of the data flow and
controls, the logical design and the physical
2
implementation.
3
COMPUTER ARCHITECTURE – DEFINITIONS (2)
Computer Architecture is the study of the organization and
interconnection of components of computer systems.
Computer architects construct computers from basic buildings
blocks such as memories, arithmetic units and buses.
• From those building blocks the Computer Architecture can
construct any number of different types of computers.
The overall design of:
the system level,
the kinds of instructions available,
the kinds of data used,
the mechanics available for altering the flow of control,
the memory organization and addressing,
The relationship between instruction set and memory
organization,
the method by which the virtual machine is implemented-loosely
grouped together under the imprecise labels of Computer
Organization or Computer Architecture.
Computer architecture is the study of the structure, behavior
and design of computers.
4
COMPUTER ARCHITECTURE – DEFINITIONS (3)
Computer Architecture is a term commonly used to denote
the organization and design of digital computers.
• The design of the system specifications at a general or
subsystem level is called Computer Architecture.
• It is the “blue-print“ used to build the machine.
• It is the instruction set and the I/O connection capabilities.
• Machines with the same architecture can execute the same
programs and can have the same I/O devices connected to
them.
• The organization of a machine is usually shown by a block
diagram.
• It is the art, science and/or engineering of computer
structure, organization, implementation and performance
evaluation.
5
• Generally, Computer architecture refers to those
attributes of a system visible to a programmer, or put
another way, those attributes that have a direct impact on
the logical execution of a program (Summary by W.
Stallings).
As explained that computer architecture is those
attributes of the system that are visible to a programmer.
Those attributes that have a direct impact on the
execution of a program are.
• Instruction sets
• Data representation – number of bits used to represent
data
• Input/output mechanisms
• Memory addressing techniques
6
Architecture Attributes
The following are the computer architecture attributes:
• Instruction sets,
• Instruction format;
• Operation codes
• Operand types,
• Operand addressing modes
• Registers
• Main memory space utilization (Memory map)
• I/O space allocation (I/O map)
• Interrupt assignment and priority
• DMA channels assignment & priority
• I/O techniques used for various devices
• I/O Controller command formats
• I/O Controller statuas format
7
Computer Organization
• It describes the function and design of the
various units of digital computer that store and
process information.
• Computer organization deals with structural
relationships that are not visible to the
programmer, such as interfaces to peripheral
devices, the clock frequency, and the technology
used for the memory.
• It describes the operational units and their
interconnections that realize the architectural
specifications.
8
Why we Study Computer Organization and
Architecture?
• In order to structure a program so that it runs
more efficiently on a real machine.
• In selecting a system to use, they should be able
to understand the tradeoff (swap or exchange)
among various components, such as CPU clock
speed vs. memory size.
9
Difference between Architecture and Organization
• Computer architecture deals with those aspects of a
computer that are visible to a programmer, while computer
organization deals with those aspects that are at a more
physical level and are not made visible to a programmer.
• It is an architectural issue whether a computer will have a
multiply and division instructions
• It is organizational issue whether to implement
multiplication and division by special unit or by a
mechanism that makes repeated use of the add and subtract
unit to perform multiplication and division, respectively
• The organizational issue may be based on which approach
to be used depending on the speed of operation, cost & size
of the hardware & the memory required to perform the
operation 10
Structure and Function
• A computer is a complex system; contemporary
computers contain millions of electronic
components.
• How, then, can one clearly describe a computer?
The key is to recognize the hierarchical nature of
most complex systems.
• A hierarchical system is a set of interrelated
subsystems where each subsystem is a
hierarchical structure.
• At each level the system consists of a set of
components and their interrelationships.
• At each level, a designer is concerned with
structure and function: 11
Structure
• The four main internal structural components of a
computer are:
A) Central processing unit (CPU) – controls the operation
of the computer and performs its data processing
functions.
B) Main memory – stores data.
C) Input/output (I/O) – moves data between the computer
and its external environment.
D) System interconnections – some mechanism that
provides for communication among CPU, main memory,
and I/O.
12
Functional Units
• A computer consists of 5 main parts:
• Input, Memory , Arithmetic and logic, Output , and
Control Units
17
1.3. ALU:
• Most computer operations are executed in ALU.
• Consider an 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. 18
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. 19
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.
• Add the contents of Register R1 & R0 and places the sum into
R0.
20
Fig: 1.2 Connection between Processor and Main Memory
21
A) Instruction Register (IR):
• It holds the instruction that is currently being executed.
• It generates the timing signals.
B) Program Counter (PC):
• It contains the memory address of the next instruction to
be fetched for execution.
C) Memory Address Register (MAR):
• It holds the address of the location to be accessed.
D) Memory Data Register (MDR):
• contains the data to written into or read out of the
address location.
• MAR and MDR facilitates the communication with
memory.
22
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.
23
• 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.
24