Professional Documents
Culture Documents
Processor organization
W.C. Deshapriya 1
Learning Outcomes
After completing this lesson, student will be able to describe the
Organization in CPU. And also describe the
• Organization & Function of each unit in CPU
• Classification of Processor
• Instruction Execution steps
2
CPU
The Central Processing Unit (CPU) is the ‘Brain’ of a computer system.
It is a circuits of microprocessor that can perform
• Calculations
• Comparisons
• Proceeds the logical decisions
3
Sub units in CPU
CPU has three main parts:
• Arithmetic and logic unit (ALU)
• Control unit (CU)
• Memory unit (set of registers )
4
Arithmetic and logic unit
• An Arithmetic Logic Unit (ALU) is a digital circuit that performs
arithmetic and logical operations on CPU.
5
Arithmetic and logic unit
• An Arithmetic Logic Unit (ALU) is a digital circuit that performs
arithmetic and logical operations on CPU.
6
Control Unit
• The Control Unit controls
• the instructions decodes
• other parts of the CPU
• rest of the computer systems
7
Memory unit
• Memory is a set of storage used to store data and instructions.
• Registers are fast and stand-alone storage locations inside the CPU
that hold data temporarily.
• Multiple registers are used to simplify the operation of the CPU
8
Types of CPUs
• The types of CPUs decide according to the speed, Efficiency,
Multithreading, cache, clock frequency, effective functioning of
the computer, and mobile devices.
Different types of CPU processors and their features
9
Types of CPUs
Dual Core CPU
• A dual-Core CPU is actually a single CPU, but it has two cores on
the chip that’s why this CPU functions like two CPUs.
• Dual-core CPU can execute more than one operation at the same
time and at a higher speed.
Quad Core CPU
• The term Quad indicates the 4 cores present in the processor.
• It has four cores working simultaneously.
10
Other Types of CPUs
Hexa Core CPU - consists of 6 cores, Octa-Core CPU - consists of 8
cores and Deca Core CPU - consists 10 cores
CPU (Processor) No. of Cores Launched Name Speed and Cache Level
Intel released their first Single-core processor in the 740 KHz and 640 bytes of
Single Core CPU 1 Intel 4004
Year 1971. RAM.
11
CPU Organization
The parts in CPU are connected by three groups of connections,
called as the bus line.
• Data bus
• Address bus
• Control bus
12
Connecting to CPU and memory
• The CPU and main memory are normally connected by using data bus
and address bus line.
13
Connecting CPU and USB devices
14
Memory architecture
• All data and instructions are loaded to main memory before the
process.
• The digital computer architecture is design based on buses (signal
path) for instruction and data.
15
Memory architecture
According to the memory accessible method, the CPU has two
architectures:
• Von Neumann architecture
• Harvard architecture
17
Harvard architecture
• In the Harvard architecture machine has physically separated
memory for instruction and data.
• It has a separate storage and separate bus line (signal path) for
instruction and data.
• It’s called as ARM processor
Ex: Apple, Atmel, Texas Instruments CPU
18
Classification of Processor
A processor can be classified into three categories
• RISC Processor
• CISC Processor
• Special Processors
19
RISC Processor
• RISC stands for Reduced Instruction Set Computer.
• It is designed to reduce the execution time by simplifying the instruction
set of the computer.
• larger RAM is required to store the instructions.
• Program is larger size
• It is used in portable devices like Apple iPod due to its power efficiency.
Characteristics of RISC
• It contains of simple instructions.
• It supports various data-type formats.
• It consists of larger number of registers.
20
CISC Processor
• CISC stands for Complex Instruction Set Computer.
• It is designed to minimize the number of instructions per program,
ignoring the number of cycles per instruction.
• Small size RAM is required to store the instructions.
• Program is small size
Characteristics of RISC
• Variety of addressing modes.
• Larger number of instructions.
• Several cycles may be required to execute one instruction.
• Instruction-decoding logic is complex.
21
Special Processors
• These are the processors which are designed for some special purposes.
• It is a special designed microprocessor having a local memory of its own,
which is used to control I/O devices.
For example −
• Keyboard/mouse controller cpu
• Smart IOT systems
22
CPU Registers
• Registers are fast and stand-alone storage locations inside the CPU
that hold data temporarily.
• Multiple registers are used to simplify the operation of the CPU
23
Accumulator
• This is the most common register, used to store data taken out
from the main memory.
• Used to store the result after executing.
• It has different sizes in different microprocessors.
24
General Purpose Registers
25
Special Purpose Registers
This registers are used to store status of a program in Computer
system.
These registers are designated for a special purpose only.
• PC - Program Counter
• IR - Instruction Register
26
MAR & MDR Registers
MAR - Memory Address Register
• It holds the address of the main memory location unit.
27
PC & IR Registers
PC - Program Counter
• holds the memory address of the next instruction to be fetched.
IR - Instruction Register
• holds the instruction executing on CPU.
executing
28
Operation of CPU
• The fundamental operation of the CPUs is to execute a sequence of stored
instructions, called a program executing.
• There are four steps in executing cycle.
Fetch → decode → execute → write back (Store)
29
Fetch
• Read an instruction from main memory.
• The location of program memory is determined by a program
counter (PC)
Fetch
30
Decode
• In this step, the loaded instruction (program) split into two
parts;
• op- code (operator)
• Operand (data or address)
31
Execute
• Now the instruction will be executed, and the outputs
will be loaded in to an ALU
• an arithmetic overflow flag in a flags register may also be
set.
• The result again save on main memory.
32
Example:
The data (25,23) are stored in 0010 and 0101 and one instruction is
stored in 0111 of main memory. The instruction program is used to
add those data.
When execute a program:
Program: x = 25
y = 23
z=x+y
33
Solution:
34
Solution:
decode
25 23 0010 | 25
0101| 23
0111| add
35
Activity
The data x is saved on 0110, data y is saved on 0010 and
instruction is stored in 0011 of main memory. The instruction
program is used to get product of data by constant 6.
after execute the program on the CPU the result save on location
1101 on the main memory.
Explain the step doing by the CPU.
Program: x=5
y=6
z=x*y
36
Solution:
37
Control Function Function: ADD x , y
Data loading process:
Program: x = 25
y = 23 Load x: MAR =100
z=x+y MDR =x
MDR→ R1
38
Thanks!
39