0% found this document useful (0 votes)
17 views14 pages

Basic Operational Concepts

Uploaded by

kishoreupk
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)
17 views14 pages

Basic Operational Concepts

Uploaded by

kishoreupk
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/ 14

Computer

Architecture
Unit I – BASIC STRUCTURE OF
COMPUTERS
2. Basic Operational Concepts
Dr.R.Kalaiselvi
Overview

➢How does a user instruction get executed?

➢What are all the impacts made by an instruction


execution?

➢What is Interrupt?
A Typical Instruction
➢Add LOCA, R0

➢Add the operand at memory location LOCA to the operand in a


register R0 in the processor.

➢Place the sum into register R0.

➢The original contents of LOCA are preserved.

➢The original contents of R0 is overwritten.


A Typical Instruction
➢Add LOCA, R0
➢Control signal is given to CPU to carry out the addition
operation
➢CPU has to wait till the operand comes from memory
➢CPU time is wasted - CPU is faster than memory
➢This instruction comprises two operations –
✓ Transfer of data from memory to CPU (Memory
Access)
✓ Addition of data (ALU)
➢ Hence separate the operations
Separate Memory Access and
ALU Operation
➢Load LOCA, R1

➢Add R1, R0

➢Which will be overwritten?


➢R1
➢R0
➢LOCA?
➢Will not be overwritten
Performance
• Add LOCA, R0 ➢Load LOCA, R1

➢Add R1, R0

➢Which will be efficient pertinent to CPU?


Connection Between the
MAR

PC

IR
Memory

MDR

R0

R1
Control

ALU
Processor

Processor and the Memory


Rn - 1

n general purpose
registers

Figure 1.2. Connections between the processor and the memory.


Registers

• Instruction register (IR)

• Program counter (PC)

• General-purpose register (R0 – Rn-1)

• Memory address register (MAR)

• Memory data register (MDR)


Typical Operating Steps
1000 I1
I1 Input PC 1000
1005 I2 CU
Read
1010 I3
MDR
MAR 1000

201F In
I1
CPU

IR Decoder
Memory
I1
ALU
Typical Operating Steps
(cont.,)
• Programs reside in the memory through input devices
• PC is set to point to the first instruction
• The contents of PC are transferred to MAR
• A Read signal is sent to the memory
• The first instruction is read out and loaded into MDR
• The contents of MDR are transferred to IR
• Decode and execute the instruction
Typical Operating Steps
(Cont’)
• Get operands for ALU
➢General-purpose register
➢Memory (address to MAR – Read – MDR to ALU)
• Perform operation in ALU
• Store the result back
➢To general-purpose register
➢To memory (address to MAR, result to MDR – Write)
• During the execution, PC is incremented to
the next instruction
Interrupt
➢Normal execution of programs may be preempted if some
device requires urgent servicing.

➢The normal execution of the current program must be


interrupted – the device raises an interrupt signal.

➢Interrupt-service routine

➢Current system information backup and restore (PC, general-


purpose registers, control information, specific information)
Summary
Execution of Instructions:

➢ Normally instructions are executed in sequential order.

➢ Instruction execution involves – fetching instruction , fetching data,


decoding instruction, execution

➢ PC points next instruction to be executed

➢ MAR and MDR have the direct connection with the memory

➢ Interrupt – a request from I/O device for the service by processor

You might also like