0% found this document useful (0 votes)
155 views

3.1 Components of Central Processing Unit

The CPU performs four basic functions: fetch, decode, execute, and store. It contains an arithmetic logic unit (ALU) that performs arithmetic and logic operations, and a control unit that directs data flow and ensures instructions are executed correctly. The CPU communicates with memory and devices via buses - the address bus sends memory addresses, the data bus transfers data, and the control bus sends timing signals. Cache memory stores frequently used data to speed up processing. Registers are high-speed memory locations inside the CPU used to temporarily store data and instructions during processing.

Uploaded by

hazardahmed132
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)
155 views

3.1 Components of Central Processing Unit

The CPU performs four basic functions: fetch, decode, execute, and store. It contains an arithmetic logic unit (ALU) that performs arithmetic and logic operations, and a control unit that directs data flow and ensures instructions are executed correctly. The CPU communicates with memory and devices via buses - the address bus sends memory addresses, the data bus transfers data, and the control bus sends timing signals. Cache memory stores frequently used data to speed up processing. Registers are high-speed memory locations inside the CPU used to temporarily store data and instructions during processing.

Uploaded by

hazardahmed132
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/ 15

1/19/2023

Architecture of CPU
Adapted by: Mr. Younus Bashir

Sub Topic

3.1 Components of Central


Processing Unit (CPU)

1
1/19/2023

SLO # 3.1.1

Describe the role of CPU in


computer system;

The central processing unit (CPU) of a computer is a piece of hardware that carries
out the
instructions of a computer program. It performs the basic arithmetical, logical, and
input/output
operations of a computer system. The CPU is like the brains of the computer - every
instruction,
no matter how simple, has to go through the CPU.

The CPU is sometimes also referred to as the central processor unit, or processor for
short.

Top view Bottom view

2
1/19/2023

The Four Primary Functions of the CPU


The CPU processes instructions it receives in the process of decoding data. In
processing this data, the CPU performs four basic steps:

•Fetch:
Each instruction is stored in memory and has its own address. The processor takes this
address number from the program counter, which is responsible for tracking which
instructions the CPU should execute next.
•Decode:
All programs to be executed are translated to into Assembly instructions. Assembly code
must be decoded into binary instructions, which are understandable to your CPU. This step
is called decoding.
•Execute:
While executing instructions the CPU can do one of three things: Do calculations with its
ALU, move data from one memory location to another, or jump to a different address.
•Store:
The CPU must give feedback after executing an instruction, and the output data is written
to the memory.

What is an ALU?
An arithmetic logic unit (ALU) is a digital circuit used to perform arithmetic and logic
operations. It represents the fundamental building block of the central processing unit
(CPU) of a computer. Modern CPUs contain very powerful and complex ALUs.

In addition to ALUs, modern CPUs contain a control unit (CU).

3
1/19/2023

ALUs routinely perform the following operations:

•Logical Operations:
These include AND, OR, NOT, XOR, NOR, NAND, etc.

•Bit-Shifting Operations:
This pertains to shifting the positions of the bits by a certain number of places
to the right or left, which is considered a multiplication operation.

•Arithmetic Operations:
This refers to bit addition and subtraction. Although multiplication and division
are sometimes used, these operations are more expensive to make. Addition can
be used to substitute for multiplication and subtraction for division.

Control Unit:

A control unit (CU) handles all processor control signals. It directs all
input and output flow, fetches code for instructions from micro
programs and directs other units and models by providing control and
timing signals.

A CU component is considered the processor brain


because it issues orders to just about everything and ensures correct
instruction execution.

4
1/19/2023

CU functions are as follows:

•Controls sequential instruction execution


•Interprets instructions
•Guides data flow through different computer areas
•Regulates and controls processor timing
•Sends and receives control signals from other computer devices
•Handles multiple tasks, such as fetching, decoding, execution handling and
storing results

Cache memory:

Cache memory, also called CPU memory, is high-speed static


random access memory (SRAM) that a computer microprocessor can
access more quickly than it can access regular random access
memory (RAM).

This memory is typically integrated directly into the CPU chip or


placed on a separate chip that has a separate bus interconnect
with the CPU.

The purpose of cache memory is to store program instructions and


data that are used repeatedly in the operation of programs or
information that the CPU is likely to need next

5
1/19/2023

As the microprocessor processes data, it looks first in the cache memory.


If it finds the instructions or data it's looking for there from a previous
reading of data, it does not have to perform a more time-consuming
reading of data from larger main memory or other data storage devices.

It also avoids the need to access the dynamic RAM to retrieve the same
data repeatedly.

Cache memory is responsible for speeding up computer operations and


processing.

Internal Bus:

A bus is a pathway for digital signals to rapidly move data.

The electrically conducting path along which data is transmitted inside


any digital electronic device. It only operates internally in a computer or
system.

A Computer bus consists of a set of parallel conductors, which may be


conventional wires, copper tracks on a PRINTED CIRCUIT BOARD. Each
wire carries just one bit, so the number of wires determines the largest
data WORD the bus can transmit: a bus with eight wires can carry only 8-
bit data words, and hence defines the device as an 8-bit device.

6
1/19/2023

Types of Internal processor Bus

There are three internal buses associated with processors:

Data bus,
Address bus,
Control bus.

Together, these three make up the “system bus.”

The system bus is an internal bus, intended to connect the processor with
internal hardware devices, and is also called the “local” bus,

Front Side Bus, or is sometimes loosely referred to as the “memory bus.”

Address Bus

•The address bus is 'unidirectional', over which the microprocessor sends


an address code to the memory or input/output.

•The size (width) of the address bus is specified by the number of bits it
can handle.

•The more bits there are in the address bus, the more memory locations a
microprocessor can access.

•A 16 bit address bus is capable of addressing 65,536 (64K) addresses.

7
1/19/2023

Data Bus

The data bus is 'bi-directional' data or instruction codes from


memory or input/output are transferred into the microprocessor

The result of an operation or computation is sent out from the


microprocessor to the memory or input/output.

Depending on the particular microprocessor, the data bus can


handle 8 bit or 16 bit data.

Control Bus

•The control bus carries the control signals that make sure everything is
flowing smoothly from place to place.

•The control bus is used by the microprocessor to send out or receive


timing and control signals in order to coordinate and regulate its
operation and to communicate with other devices,
•i.e. memory or input/output.

•This is a dedicated bus, because all timing signals are generated


according to control signal.

8
1/19/2023

BLOCK DIAGRAM OF A BASIC COMPUTER


SYSTEM
Basic computer system consist of a Central processing unit (CPU),
memory (RAM and ROM), input/output (I/O) unit and internal
processor bus.

Address bus
MAR

ALU
ROM RAM I/O I/O
interface devices
CPU

MAR
Data bus Control
CU bus

 SLO # 3.1.3

Describe the functions of following registers and their types,


i.e. a. General purpose register
(Accumulator (AC) and Data Register (DR), Base Register (BR),
Counter Register (CR))
b. Special purpose register
(Instruction Register (IR), Memory Address Register (MAR),
Program Counter (PC), Memory Buffer Register (MBR));

9
1/19/2023

Register Memory:

The register section/array consists completely of circuitry used to


temporarily store data or program codes until they are sent to the ALU
or to the control section or to memory.

The number of registers are different for any particular CPU and the
more register a CPU have will result in easier programming tasks.

Registers are normally measured by the number of bits they can hold, for
example, an "8-bit register" or a "32-bit register".

Registers Characteristics

•These are the high speed memory locations built into the
microprocessor.
•The CPU uses these locations to store data and instructions
temporarily for processing.
•CPU processes, stores and transfer data from one component to
another with the help of registers.
•The number of register varies among computers.
•It increases the performance of CPU.
•Each register receives the information, holds it temporarily and pass it
on, as directed by CU.
•The size of register depends on the computer architecture

10
1/19/2023

General purpose register:


The general purpose registers are used to store temporary data in the
time of different operations in microprocessor.

There are four general purpose registers which are AX, BX, CX and DX.

Each can be used to manipulate a whole 16-bit word or with two separate
8-bit bytes. These bytes are called the lower and upper order bytes. Each
of these registers can be used as two 8-bit registers.

NOTE: 8086 has eight general purpose registers.

General Purpose Registers

These are:

•Accumulator (AX)

•Base register (BX)

•Count register (CX)

•Data register (DX)

11
1/19/2023

Accumulator:
•AX, which is named the accumulator. It is used for all input/output
operations and some arithmetic operations. For example, multiply, divide
and translate instructions assume the use of AX.
The AX register is the most general purpose of the four registers and is
usually used for all types of operations

Base Register:
•BX, which is named the base register. It can be used as an address
register. It is used for arithmetic and data movement. It has special
addressing capabilities.

Counter Register:
•CX, which is the count register. It is used by instructions which require
to count. Typically it is used for controlling the number of times a loop is
repeated and in bit shift operations.

Data Register:
•DX, which is the data register. It is used for some input/output and also
when multiplying and dividing.

12
1/19/2023

Special purpose register:


hold program state; they usually include the program counter (aka
instruction pointer), stack pointer, and status register (aka processor
status word). In embedded microprocessors, they can also correspond to
specialized hardware elements

There are four special purpose registers which are


Instruction Register (IR),
Memory Address Register (MAR),
Program Counter (PC),
Memory Buffer Register (MBR)
.

There are four types Special Purpose Register

i. Program Counter (PC)


ii. Instruction Register (IR)
iii. Memory Address Register (MAR)
iv. Memory Buffer Register (MBR);

13
1/19/2023

Program Counter (PC)


•Used to store the address of the next instruction to be fetched for
execution.
•When the instruction is fetched, the value of program counter is
incremented.

Instruction Register (IR)


•Instruction register is used to store the fetched the instruction.
•After loaded the instruction from memory, it is decoded and then
executed. Consequently, instruction register serves the data input to the
part of decoding process

Memory Address Register (MAR)


•Used to store memory address being used by the processor.

•When processor wants to READ data from or WRITE data in memory, it


stores the address of that memory location in this register.

Memory Buffer Register (MBR)


•Used to store data coming from or going from the memory.

•stores the data being transferred to and from the immediate access
storage.
•It is also known as the Memory data register (MDR).

•It contains the copy of designated memory locations specified by


the memory address register.

14
1/19/2023

Special Purpose Register General purpose registers (GPRs)

hold program state; they usually include the Can store both data and addresses, i.e.,
program counter (aka instruction pointer), they are combined Data/Address registers.
stack pointer, and status register (aka
processor status word). In embedded
microprocessors, they can also correspond to
specialized hardware elements

Instruction Register (IR), Memory Address Accumulator (AC) and Data Register (DR),
Register (MAR), Program Counter (PC), Base Register (BR), Counter Register (CR)
Memory Buffer Register (MBR)

Resources
Role of CPU

https://study.com/academy/lesson/central-processing-unit-cpu-parts-definition-function.html

Functions of ALU
https://computersciencewiki.org/index.php/Functions_of_the_arithmetic_logic_unit_(ALU)

Functions of CONTROL UNIT


https://study.com/academy/lesson/arithmetic-logic-unit-alu-definition-design-function.html

Cache memory
https://searchstorage.techtarget.com/definition/cache-memory

15

You might also like