Upload
aman-garg
View
198
Download
1
Embed Size (px)
Citation preview
CPU(central Processing
Unit)
The CPU
The CPUConverts data into informationControl centerSet of electronic circuitry that
executes stored program instructionsTwo parts
Control Unit (CU)Arithmetic Logic Unit (ALU)
Control Unit CUPart of the hardware that is in-chargeDirects the computer system to execute
stored program instructionsCommunicates with other parts of the
hardware
Arithmetic OperationsAddition
SubtractionMultiplication
Division
Logical OperationsEvaluates conditionsMakes comparisonsCan compare
NumbersLettersSpecial characters
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
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
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
MemoryMany Names
Primary storagePrimary memory
Main storageInternal storageMain memory
Main Types of MemoryRAM
Random Access Memory
ROMRead Only Memory
RAMRequires current to retain valuesVolatileData and instructions can be read and
modifiedUsers typically refer to this type of
memory
What’s in RAM?Operating SystemProgram currently runningData needed by the programIntermediate results waiting to be output
ROMNon-volatileInstructions for booting the computerData and instructions can be read, but not
modifiedInstructions are typically recorded at factory
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
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
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
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
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
Data RepresentationOn/Off
Binary number system is used to represent the
state of the circuit
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
Rajsher Singh DudhanClass 6-P