3.top-Level View of Computer
3.top-Level View of Computer
Computer Architecture
Presented by
Chapter 3 Tariq Bin Amir
05/02/2025 2
Hardware & Software Approaches
❑ Hardware Approach
▪ If there is a particular computation to be performed, a configuration of logic
components designed specifically for that computation could be constructed.
▪ The process of connecting the various components in the desired configuration
as a form of programming
▪ The resulting “program” is in the form of hardware and is termed a hardwired
program
❑ Software Approach
▪ Construct a general-purpose configuration of arithmetic and logic functions. This
set of hardware will perform various functions on data depending on control
signals applied to the hardware
▪ A sequence of codes or instructions
▪ Part of the hardware interprets each instruction and generates control signals
▪ Provide a new sequence of codes for each new program instead of rewiring the
hardware
05/02/2025 3
Hardware & Software Approaches
05/02/2025 4
Register
Registers are a type of computer memory used to quickly
Memory Memory
address buffer
register register
(MAR) (MBR)
• Specifies the • Contains the data
address in to be written into
memory for the memory or
next read or write receives the data
read from
memory
05/02/2025 9
Fetch Cycle
At the beginning of each instruction cycle the processor fetches an
The program counter (PC) holds the address of the instruction to be fetched
next
The processor increments the PC after each instruction fetch so that it will
The processor interprets the instruction and performs the required action
05/02/2025 10
Execute Cycle
• Data transferred • Data transferred
Processor-memory from processor to or from a
to memory or peripheral
Data transfer between CPU from memory to device by
and main memory processor transferring
between the
processor and
Processor I/O Processo an I/O module
Processo
r-
Data transfer between CPU r-I/O
memory
and I/O module
Data processing
Some arithmetic or logical Data
operation on data Control processi
ng
Control • An instruction • The processor
may specify that may perform
Alteration of sequence of the sequence of some arithmetic
execution be or logic
operations such as: jump altered operation on
data
05/02/2025 11
Instruction
Computer instructions are a set of machine language instructions that a
particular processor understands and executes. A computer performs tasks
on the basis of the instruction provided.
05/02/2025 12
Instruction Cycle State Diagram
05/02/2025 13
Instruction Cycle State Diagram
Instruction address calculation (IAC):
Compute the next instruction’s address by adding a fixed value to the
current address
Instruction fetch (IF):
Retrieve the instruction from memory
Instruction operation decoding (IOD):
Decode the instruction to determine the operation and operand(s)
Operand address calculation (OAC):
Calculate the memory or I/O address for the operand, if needed
Operand fetch (OF):
Fetch the operand from memory or I/O
Data operation (DO):
Execute the operation specified by the instruction
Operand store (OS):
Store the result in memory or send it to I/O
05/02/2025 14
Interrupt
Interrupt
05/02/2025 15
Classes of Interrupt
05/02/2025 16
Instruction Cycle with Interrupt
05/02/2025 17
Instruction Cycle State Diagram, with Interrupts
05/02/2025 18
Instruction Cycle State Diagram, with Interrupts
Instruction address calculation (IAC): Calculates the next
instruction’s address by adding a fixed value to the current address
Instruction fetch (IF): The processor retrieve the instruction from
memory
Instruction operation decoding (IOD): Decodes the fetched
On any bus the lines can be classified into three functional groups:
Data bus
Address bus
Control bus
05/02/2025 20
Bus Interconnection
05/02/2025 21
Data Bus
A data bus is a computer subsystem that allows for the transferring of data
from one component to another on a motherboard or between two
computers.
This can include transferring data to and from the memory, or from the
central processing unit (CPU) to other components.
A typical data bus is 64-bits wide. This means that up to 64 bits of data can
travel through a data bus every cycle.
The internal data bus, also known as a local bus, connects all components
that are on the motherboard, like the CPU and memory.
The external data bus connects all peripheral devices to the motherboard.
05/02/2025 22
Address Bus
An address bus is a computer bus which is used to address the main
system memory. For example, if the processor wishes to read a word
(8, 16, or 32 bits) of data from memory, it puts the address of the
desired word on the address lines. Clearly, the width of the address
bus determines the maximum possible memory capacity of the
system.
Most desktop and server motherboards include the address bus in the
memory bus between the memory controller chip and the system
memory.
05/02/2025 25
Bus Types
Dedicated
Separate data & address lines
Multiplexed
Shared lines
Address valid or data valid control line
Advantage
• Fewer lines
Disadvantages
Thank You
05/02/2025 27