Presentation is loading. Please wait.

Presentation is loading. Please wait.

Central Processing Unit

Similar presentations


Presentation on theme: "Central Processing Unit"— Presentation transcript:

1 Central Processing Unit
CPU Central Processing Unit Visit for more Learning Resources 1

2 3.2 Components of the CPU Control unit Arithmetic logic unit (ALU)
Moves data and instructions between main memory and registers Arithmetic logic unit (ALU) Performs computation and comparison operations Set of registers Storage locations that hold inputs and outputs for the ALU 2

3 3

4 CPU Structure CPU must: Fetch instructions Interpret instructions
Fetch data Process data Write data 22

5 CPU With Systems Bus

6 CPU Internal Structure

7 Actions Performed by CPU
Fetch cycle CPU: Fetches an instruction from primary storage Increments a pointer to location of next instruction Separates instruction into components (instruction code and data inputs) Stores each component in a separate register Execution cycle ALU: Retrieves instruction code from a register Retrieves data inputs from registers Passes data inputs through internal circuits to perform data transformation Stores results in a register 7

8 Register A, special, high-speed storage area within the CPU. All data must be represented in a register before it can be processed. For example, if two numbers are to be multiplied, both numbers must be in registers, and the result is also placed in a register. The power and speed of a CPU determined by the number of registers that a CPU has and the size of each (number of bits) For example a 32-bit CPU is one in which each register is 32 bits wide. Therefore, each CPU instruction can manipulate 32 bits of data. 8

9 Registers Fast stand-alone storage locations that hold data temporarily in CPU. PC (Program Counter) Keep track of the instruction currently being executed. Incremented after execution of the instruction. Instruction Register Store the instruction currently being executed Data Registers Hold data before it can be processed 9

10 CPU Registers Primary roles
Hold data for currently executing program that is needed quickly or frequently (general-purpose registers) Store information about currently executing program and about status of CPU (special- purpose registers) 10

11 General-Purpose Registers
Hold intermediate results and frequently needed data items Used only by currently executing program Implemented within the CPU; contents can be read or written quickly Increasing their number usually decreases program execution time to a point 11

12 Special-Purpose Registers
Track processor and program status Types Instruction register Instruction pointer Program status word (PSW) Stores results of comparison operation Controls conditional branch execution Indicates actual or potential error conditions 12

13 ALU Arithmetic operations: Logical operations: Increment Decrement Add
Subtract Multiply Divide Logical operations: NOT AND OR XOR 13

14 Control Unit Like the part of the human brain that control the operation of each part of the body. Controlling is achieved through wires (form Control unit to ALU) that can be on/off. 4 wires  16 operations 14

15 A B C 10 20 30 CA+B ADD I ← M[PC] PC++ R1 ← A R2 ← B R3 ← R1 + R2
. 2000 CA+B 2004 CC-5 10 A 20 B 30 C 10 20 30 CA+B ADD 2000

16 3.3 The Physical CPU Electrical device implemented as silicon- based microprocessor Contains millions of switches, which perform basic processing functions Physical implementation of switches and circuits 16

17 For more detail contact us
17


Download ppt "Central Processing Unit"

Similar presentations


Ads by Google