You are on page 1of 39

Chapter -3

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.

In some processors, the ALU is


divided into two units:
* arithmetic unit (AU)
* logic unit (LU).
It supported to 32-Bits or 64-bits

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

• It load internal instructions of the


programs from the main memory to
the CPU register
• The control unit generates a control
signal that supervises the execution of
these instructions.

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

Main type of registers:


• Accumulator
• General Purpose Registers
• Special Purpose Registers

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

Single Core CPU


The single-core CPU is the oldest type.
Single-core CPUs can perform only one operation at
a single time.

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.

2.80 GHz and


Intel released their first Dual-core processor in the
Dual Core CPU 2 Pentium D 2 MB of Cache.
Year 2005.

AMD released their first Quad-core processor in the 3 GHz and


Quad Core CPU 4 Athlon II X4
Year 2009. 2 MB of Cache.
Intel released their first Hexa-core processor in the 3.60 GHz and
Hexa Core CPU 6 Intel core i7-980X
Year 2010. 12 MB of Cache.
Intel released their first Octa-core processor in the 3.50 GHz and
Octa Core CPU 8 Intel Core i7-5960X
Year 2014. 20 MB of Cache.
Intel released their first Deca-core processor in the 3 GHz and
Deca Core CPU 10 Xeon Silver 4114T
Year 2017. 13.75 MB of Cache.

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

• The CPU and USB controller connected via bus line.


• USB controller convert the bus line to the USB format as D+ and D-

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.

Two architectures are as follows:


• There is a storage and single bus line is used for both of instruction
and data transmit.
Or
• There are separate storage and separate buses are used for
instruction and data transmit.

15
Memory architecture
According to the memory accessible method, the CPU has two
architectures:
• Von Neumann architecture
• Harvard architecture

Von Neumann architecture Harvard architecture 16


Von Neumann architecture
• In the Von Neumann machine has a single memory for all instruction
and data.
• It has a single bus line (signal path) for both of instruction and data.
Ex: Computer RAM-CPU

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

Main type of registers:


• Accumulator
• General Purpose Registers
• Special Purpose Registers

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

• The General Purpose registers are used to store data during


program execution.
• These are numbered as R0, R1, R2….Rn-1,
• Used to store data temporally during program executing.

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.

• Most conman Special Purpose Registers:


• MAR - Memory Address Register
• MDR - Memory data Register

• PC - Program Counter
• IR - Instruction Register

26
MAR & MDR Registers
MAR - Memory Address Register
• It holds the address of the main memory location unit.

MDR - Memory Data Register


• Stores the data that sent to memory or fetched from memory.

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)

• The decoded value loaded in to the registry.

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:

Explain the all steps followed by the CPU.

Program: x = 25
y = 23
z=x+y

33
Solution:

34
Solution:

add Fetch (0010| 25)

decode

execute main memory


25 + 23
Address | Data

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

Load y: MAR =702


MDR =y
MDR→ R2

38
Thanks!

39

You might also like