William Stallings Computer Organization and Architecture 8 Edition
William Stallings Computer Organization and Architecture 8 Edition
Computer Organization
and Architecture
8th Edition
Chapter 3
Computer Functions and
Interconnection
von Neumann architecture and is based
on three key concepts:
• Data and instructions are stored in a
single read–write memory.
• The contents of this memory are
addressable by location, without regard to
the type of data contained there.
• Execution occurs in a sequential fashion
(unless explicitly modified) from one
instruction to the next.
Program Concept
• Hardwired systems are inflexible
• General purpose hardware can do
different tasks, given correct control
signals
• Instead of re-wiring, supply a new set of
control signals
What is a program?
• A sequence of steps
• For each step, an arithmetic or logical
operation is done
• For each operation, a different set of
control signals are needed
• Also need temp storage (memory) and
way to get input and output
CPU exchanges data with memory
• A memory address register (MAR),
specifies the address in memory for the
next read or write
• Memory buffer register (MBR), contains
the data to be written into memory or
receives the data read from memory.
• Similarly, an I/O address register (I/OAR)
specifies a particular I/O device.
• An I/O buffer (I/OBR) register is used for
the exchange of data between an I/O
module and the CPU.
Memory
• A memory module consists of a set of
locations, defined by sequentially
numbered addresses.
• Each location contains a binary number
that can be interpreted as either an
instruction or data.
• An I/O module transfers data from
external devices to CPU and memory, and
vice versa.
• It contains internal buffers for temporarily
holding these data until they can be sent
on.
Function of Control Unit
• For each operation a unique code is
provided
—e.g. ADD, MOVE
• A hardware segment accepts the code and
issues the control signals
• We have a computer!
Components
• The basic function performed by a computer is
execution of a program, which consists of a set
of instructions stored in memory.
• The Control Unit and the Arithmetic and Logic
Unit constitute the Central Processing Unit
• Data and instructions need to get into the
system and results out
—Input/output
• Temporary storage of code and results is needed
—Main memory
Computer Components:
Top Level View
Instruction Cycle
• Two steps: Program execution halts only if the
—Fetch machine is turned off, some sort of
—Execute unrecoverable error occurs, or a
program instruction that halts the
computer is encountered
Fetch Cycle
• Program Counter (PC) holds address of
next instruction to fetch
• Processor fetches instruction from
memory location pointed by PC
• Increment PC
—Unless told otherwise
• Instruction loaded into Instruction
Register (IR)
• Processor interprets instruction and
performs required actions
Execute Cycle
• Processor-memory
—data transfer between CPU and main memory
• Processor I/O
—Data transfer between CPU and I/O module
• Data processing
—Some arithmetic or logical operation on data
• Control
—Alteration of sequence of operations
—e.g. jump
• Combination of above
Instruction Cycle State Diagram
Instruction Cycle State Diagram
• Instruction address calculation (iac):
Determine the address of the next instruction to be
executed. Usually, this involves adding a fixed number to
the address of the previous instruction.