22
CPU (central Processing Unit)

02 cpu final

Embed Size (px)

Citation preview

Page 1: 02 cpu final

CPU(central Processing

Unit)

Page 2: 02 cpu final

The CPU

Page 3: 02 cpu final

The CPUConverts data into informationControl centerSet of electronic circuitry that

executes stored program instructionsTwo parts

Control Unit (CU)Arithmetic Logic Unit (ALU)

Page 4: 02 cpu final

Control Unit CUPart of the hardware that is in-chargeDirects the computer system to execute

stored program instructionsCommunicates with other parts of the

hardware

Page 5: 02 cpu final

Arithmetic OperationsAddition

SubtractionMultiplication

Division

Page 6: 02 cpu final

Logical OperationsEvaluates conditionsMakes comparisonsCan compare

NumbersLettersSpecial characters

Page 7: 02 cpu final

RegistersSpecial-purpose

High-speedTemporary storageLocated inside CPU

Instruction register

Holds instruction currently being executed

Data register

Holds data waiting to be processed

Holds results from processing

Page 8: 02 cpu final

Types of StorageSecondary

Data that will eventually be usedLong-term

MemoryData that will be used in the near futureTemporaryFaster access than storage

RegistersData immediately related to the operation being

executedFaster access than memory

Page 9: 02 cpu final

Measuring Storage CapacityKB – kilobyte

• 1024 bytes• Some diskettes• Cache memory

MB – megabyte• Million bytes• RAM

GB – gigabyte• Billion bytes• Hard disks• CDs and DVDs

TB – terabytes• Trillion bytes• Large hard disks

Page 10: 02 cpu final

MemoryMany Names

Primary storagePrimary memory

Main storageInternal storageMain memory

Page 11: 02 cpu final

Main Types of MemoryRAM

Random Access Memory

ROMRead Only Memory

Page 12: 02 cpu final

RAMRequires current to retain valuesVolatileData and instructions can be read and

modifiedUsers typically refer to this type of

memory

Page 13: 02 cpu final

What’s in RAM?Operating SystemProgram currently runningData needed by the programIntermediate results waiting to be output

Page 14: 02 cpu final

ROMNon-volatileInstructions for booting the computerData and instructions can be read, but not

modifiedInstructions are typically recorded at factory

Page 15: 02 cpu final

Executing ProgramsCU gets an instruction and places it in

memoryCU decodes the instructionCU notifies the appropriate part of hardware

to take actionControl is transferred to the appropriate part

of hardwareTask is performedControl is returned to the CU

Page 16: 02 cpu final

Machine CycleI-timeCU fetches an instruction from memory

and puts it into a registerCU decodes the instruction and

determines the memory location of the data required

Page 17: 02 cpu final

Machine Cycle

E-timeExecution

CU moves the data from memory to registers in the ALU

ALU is given control and executes the instruction

Control returns to the CUCU stores the result of the operation in

memory or in a register

Page 18: 02 cpu final

System ClockSystem clock produces pulses at a fixed

rateEach pulse is one Machine CycleOne program instruction may actually be

several instructions to the CPUEach CPU instruction will take one pulseCPU has an instruction set – instructions

that it can understand and process

Page 19: 02 cpu final

Finding Data in MemoryEach location in memory has a unique address

Address never changesContents may change

Memory location can hold one instruction or piece of data

Programmers use symbolic names

Page 20: 02 cpu final

Data RepresentationOn/Off

Binary number system is used to represent the

state of the circuit

Page 21: 02 cpu final

Bits, Bytes, WordsBIT

Binary DigITOn/off circuit1 or 0

BYTE8 bitsStore one alphanumeric character

WORDSize of the registerNumber of BITS that the CPU processes as a

unit

Page 22: 02 cpu final

Rajsher Singh DudhanClass 6-P