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.
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.
Instructions
Instructions for a processor are defined in the
ISA (Instruction Set Architecture) Level 2
Typical instructions include:
Mov BX, LocA
Fetch the instruction
Fetch the contents of memory location LocA
Store the contents in general purpose register BX
Add AX,BX
Fetch the instruction
Add the contents of registers BX and AX
Place the sum in register AX
How are instructions sent between
memory and the processor
The program counter (PC) or instruction pointer
(IP) contains the memory address of the next
instruction to be fetched and executed.
Send the address of the memory location to be
accessed to the memory unit and issue the
appropriate control signals (memory read).
The instruction register (IR) holds the instruction
that is currently being executed.
Timing is crucial and is handled by the control
unit within the processor.
CPU
Memory
I/O