Basic Operational Concepts
Basic Operational Concepts
Structures, Softwares
Lecture 2
Basic Operational Concepts of a
Computer.
• Most computer operations are executed in the
ALU (arithmetic and logic unit) of a processor.
• Example: to add two numbers that are both
located in memory.
– Each number is brought into the processor, and
the actual addition is carried out by the ALU.
– The sum then may be stored in memory or
retained in the processor for immediate use.
Computer Components: Top-Level View
Registers
• When operands are brought into the
processor, they are stored in high-speed
storage elements (registers).
• A register can store one piece of data (8-bit
registers, 16-bit registers, 32-bit registers, 64-
bit registers, etc…)
• Access times to registers are faster than access
times to the fastest cache unit in the memory
hierarchy.
Registers
• Instruction register (IR):
– holds the instruction that is currently being
executed.
• Program counter (PC):
– contains the address of the next instruction to be
fetched and executed.
– During the execution of a instruction, the contents
of the PC are updated with the address of the next
instruction to be executed.
– Keeps track of the execution of a program
Registers
• Memory address register (MAR)
– Holds the address of the location to be accessed
• Memory data register (MDR)
– Contains the data to be written into or read out of
the addressed location.
• General-purpose register (R0 – Rn-1)
– Used to store data on which ALU performs its
operations
TYPICAL OPERATING STEPS
• 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
(data already in General purpose
registers)