0% found this document useful (0 votes)
9 views26 pages

Comp Arch Chapter 2

Chapter Two provides an overview of computer systems, detailing their structure and function, including the main components such as the CPU, main memory, and I/O devices. It explains the basic operations of data processing, storage, movement, and control, as well as the instruction cycle and the role of interrupts in processing. The chapter emphasizes the von Neumann architecture and the importance of software in executing programs through fetch and execute cycles.

Uploaded by

bekithelegend27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views26 pages

Comp Arch Chapter 2

Chapter Two provides an overview of computer systems, detailing their structure and function, including the main components such as the CPU, main memory, and I/O devices. It explains the basic operations of data processing, storage, movement, and control, as well as the instruction cycle and the role of interrupts in processing. The chapter emphasizes the von Neumann architecture and the importance of software in executing programs through fetch and execute cycles.

Uploaded by

bekithelegend27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Chapter Two :

Computer System Overview


2

In this chapter:
 Structure and Function
 Basic Computer Components and
Function
 Instruction Cycle & Interrupts
Computer Structure and Function 3

Computer system- a complex system


 Consists of millions of electronic components
Computer system consists of a set of components
and their interrelationships
Structure is the way in which components are
interrelated
Function is the operation of each individual
component as part of the structure
Function 4

All computer functions are composed of four


basic operations:
 Data processing
 Data storage
 Data movement –b/n itself & the outside world
 Control
Structure 5

All of computer linkages to the external env’t can be


classified as peripheral devices or communication line.

The computer
Contd… 6

There are four main structural components:

 CPU – controls the operation of the computer


& performs its data processing functions
 Main memory – stores data
 I/O – moves data b/n computer & its external
env’t
 System interconnection – mechanism that
provides for communication among CPU, main
memory, & I/O
Structure –Top Level 7
Structure –The CPU 8
Structure –The Control Unit 9
Computer components 10

Virtually all contemporary computer designs are based on


von Neumann architecture
Key concepts:
 Data and instructions stored in a single R-W memory
 Contents are addressable by location
 Execution is sequential
Components reconfigured as application changes (called
programming)
Resulting “program” – hardwired program
Computer components 11

Another alternative:
 General purpose configuration of components (ALU)
 System accepts data and control signals and produce
results
 New set of control signals instead of rewiring hardware
 how control signals are supplied:
o The entire program is sequence of steps
o For each step, new set of control signals is needed
o Provide a unique code for each possible set of
control signals
o The sequence of codes/instructions is called
software.
12
Computer components

The above two components constitute the CPU


Other components:
 I/O components: for moving data into and out of
system
 Memory: to store instructions and data temporarily
Computer components 13

Central Processing Unit


 Control Unit
 Arithmetic and Logic Unit
 Registers
Input/output
 Data and instructions need to get into the system and
results out
Main Memory
 Temporary storage of code and results is needed
Interconnection structures
 Bus
Computer components 14
Computer function 15

Basic function: execution of a program


Two steps of program execution:
 Fetch
 Execute
Instruction cycle – the processing required for a
single instruction (i.e fetch and execute cycles)
Instruction cycle 16

Fetch Cycle
 Program Counter (PC) holds address of next instruction
to fetch
 Processor fetches instruction from memory location
pointed to by PC
 Increment PC
o Unless told otherwise
 Instruction loaded into Instruction Register (IR)
 Processor interprets instruction
 Instructions contain bits that specify action the
processor is to take
 These actions fall into 4 categories: Processor-memory,
processor I/O, Data processing, Control
Instruction cycle 17

Execute cycle:
 Processor-memory
o Data transfer between CPU and main memory
 Processor I/O
o Data transfer between CPU and I/O module
 Data processing
o Some arithmetic or logical operation on data
 Control
o Alteration of sequence of operations
o e.g. jump
 Instruction execution may involve combination of the
above
18
Example of ProgramExecution
Example – consider the following machine:
Example of ProgramExecution 19

Program:
AC ← M(940)
AC ← AC +
M(941)
M(941) ← AC
Instruction Cycle State Diagram 20
Interrupts 21

Interrupt
 Mechanism by which various events (e.g. I/O) may
interrupt normal sequence of processing
 Classes of interrupts:
o Program
• Overflow, division by zero, etc.
o Timer
• Generated by internal processor timer
• Used in pre-emptive multi-tasking
o I/O
• From I/O controller
o Hardware failure
• Memory parity error, etc.
Interrupts 22

Interrupt Cycle
 Added to instruction cycle
 Processor checks for interrupt
Indicated by an interrupt signal
 If no interrupt, fetch next instruction
 If interrupt pending:
Suspend execution of current program
Save context
Set PC to starting address of interrupt handler
routine
 Process interrupt
 Restore context and continue interrupted
program
Interrupts 23
Instruction cycle with interrupt 24
State diagram with interrupt 25
26

Reading Assignment
Multiple Interrupts

You might also like