Vous êtes sur la page 1sur 2

Function of CPU.

(ITC, Lecture Notes)

CPU STRUCTURE AND FUNCTION


A computer consists of CPU, Memory and I/O components. The basic function of the
processor is executing instructions. The instruction execution consists of two steps. Fetch
instructions from memory one at a time (fetch cycle) and executes each instruction
(execute cycle).

CPU: Basic Structure


CPU consists of:
•CU (Control unit)
•ALU (Arithmetic Logic Unit)
• Registers (a minimal CPU-internal memory consisting of a set of storage
locations.
• Internal CPU Bus: This element is needed to transfer data between the
various registers and the ALU, because the ALU operates only on data in the
internal CPU memory.

Function of CPU in terms of CU, ALU & Registers.


• CU
• Controls the data & instruction movement to and from CPU, also
sequence the operation of the computer.
• Controls the ALU operation
• Instruction fetches from main memory & interprets the instruction and
generates control & timing signals to operate other units.

• ALU
• Performs the actual computation or processing of data by arithmetic &
logic operations.
• Only operates on data in the internal CPU memory.
• Flag settings
• Arithmetic operation like Addition, Subtraction, Multiplication, Division.
• Logic function like AND, OR, etc.

• Registers
• It is an internal CPU memory, fast & most expensive.
• Used for temporary storage of results & control information. It also
contains a level of memory above main memory i.e. cache memory.

Registers are categorized as:


• General purpose register: May be used for floating point stack operations
• Data register : To hold data
• Address register : To be used for a particular addressing mode
• Condition codes register: For conditional branch instruction. These are
special registers, where each bit represents a
condition, which is set by certain operations and
used in conditional branch instructions. These
conditions are set by arithmetic and compare
operations.
Function of Memory

Instructor: Dr. Mohammed Yousuf Khan 1


Function of CPU. (ITC, Lecture Notes)

It is used for data/program storage. Each location has address. Communication between
CPU & main memory is via some registers and R/W control lines.
Memory Read: Causes data from the addressed location to be placed on the bus.
Memory Write: Causes data on the bus to be written into the addressed location.

I/O Devices:
Input Device : Which accepts outside information
Output Device : Communicate to outside device.
Touch screen I/O device is:

A user selecting an object on touch screen


Bus Inter Connection
Bus:
• A communication path to connect two or more devices (only one device
communicate at a time)
• A shared transmission medium
• 8 bit unit of data can be transmitted over 8bit bus lines
• The bus inter connection structure provides the data movement among:
Mem to CPU : CPU reads from Mem
CPU to Mem : CPU write to Mem
I/O to CPU : CPU R/W from I/O module
I/O to/from Mem: May be exchange data directly with memory, without going
through CPU using DMA.
Bus Structure
• Address bus : to designate the source/destination of the data
• Data bus : path for moving data between the system modules
• Control lines : control to access to and the use of data and address lines.
Some typical control line includes: Memory R/W, I/O R/W, Bus request, IRQ,
Clock, Reset.
• Timing signals: Timing refers to the way in which events are coordinated
on the bus.

Instructor: Dr. Mohammed Yousuf Khan 2

Vous aimerez peut-être aussi