0% found this document useful (0 votes)
77 views50 pages

Chapter 3 1 Central Processing Unit (CPU)

The central processing unit (CPU) is the component of a computer system that processes instructions and data. It consists of a control unit that directs operations and an arithmetic logic unit that performs calculations. The CPU interacts with memory, which temporarily stores data and instructions, and registers, which provide high-speed temporary storage. Program instructions are executed through a fetch-decode-execute cycle controlled by the CPU and its system clock. Data is represented in binary and stored in memory locations that can be accessed randomly through their unique addresses. Faster processing is achieved through cache memory, parallel processing, pipelining, and higher microprocessor speeds and bus widths.

Uploaded by

Zack Zahar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views50 pages

Chapter 3 1 Central Processing Unit (CPU)

The central processing unit (CPU) is the component of a computer system that processes instructions and data. It consists of a control unit that directs operations and an arithmetic logic unit that performs calculations. The CPU interacts with memory, which temporarily stores data and instructions, and registers, which provide high-speed temporary storage. Program instructions are executed through a fetch-decode-execute cycle controlled by the CPU and its system clock. Data is represented in binary and stored in memory locations that can be accessed randomly through their unique addresses. Faster processing is achieved through cache memory, parallel processing, pipelining, and higher microprocessor speeds and bus widths.

Uploaded by

Zack Zahar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 50

Processing Unit:

Chapter 31
Central Processing Unit
(CPU)

Objectives
Identify the components of the central
processing unit and how they work together and
interact with memory
Describe how program instructions are executed
by the computer
Explain how data is represented in the computer
Describe how the computer finds instructions
and data
Describe the components of a microcomputer
system units motherboard
List the measures of computer processing speed
and explain the approaches that increase speed

Contents
The CPU
Types of Storage
Executing Programs
Finding Data in Memory
The System Unit
Microprocessor
Semiconductor Memory
Bus Line
Speed and Power

The CPU

The CPU
Converts data into information
Control center
Set of electronic circuitry that executes
stored program instructions
Two parts
Control Unit (CU)
Arithmetic Logic Unit (ALU)

Control Unit
CU
Part of the hardware that is incharge
Directs the computer system to
execute stored program
instructions
Communicates with other parts of
the hardware

Arithmetic / Logic Unit


ALU
Performs arithmetic operations
Performs logical operations

Registers
Special-purpose
High-speed
Temporary storage
Located inside CPU
Instruction register

Data register

Holds instruction currently


being executed

Holds data waiting to be


processed
Holds results from processing

Types of Storage
Secondary
Data that will eventually be used
Long-term
Such as Hard disk

Memory

Data that will be used in the near future


Temporary
Faster access than storage
Such as Random Access Memory (RAM)

Registers
Data immediately related to the operation being executed
Faster access than memory
Such as accumulator register (AC)

Measuring Storage Capacity


KB 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

Memory
Many Names
Primary storage
Primary memory
Main storage
Internal storage
Main memory

Main Types of Memory


RAM
Random Access Memory
ROM
Read Only Memory

RAM
Requires current to retain values
Volatile
Data and instructions can be read
and modified
Users typically refer to this type of
memory

Whats in RAM?

Operating System
Program currently running
Data needed by the program
Intermediate results waiting to be
output

ROM
Non-volatile
Instructions for booting the computer
Data and instructions can be read,
but not modified
Instructions are typically recorded at
factory

Executing Programs
CU gets an instruction and places it in
memory
CU decodes the instruction
CU notifies the appropriate part of hardware
to take action
Control is transferred to the appropriate part
of hardware
Task is performed
Control is returned to the CU

Machine Cycle
I-time
CU fetches an instruction from memory
and puts it into a register
CU decodes the instruction and
determines the memory location of the
data required

Machine Cycle
E-time
Execution
CU moves the data from memory to registers
in the ALU
ALU is given control and executes the
instruction
Control returns to the CU

CU stores the result of the operation in


memory or in a register

System Clock
System clock produces pulses at a fixed
rate
Each pulse is one Machine Cycle
One program instruction may actually be
several instructions to the CPU
Each CPU instruction will take one pulse
CPU has an instruction set instructions
that it can understand and process

Finding Data in Memory


Each location in memory has a unique address
Address never changes
Contents may change

Memory location can hold one instruction or


piece of data
Programmers use symbolic names

Data Representation
On/Of
Binary number system is
used to represent the
state of the circuit

The System Unit


The Black Box
Houses electronic components
Motherboard
Storage devices
Connections

Some Apple Macintosh models have


system unit inside monitor

The System Unit


The Black Box
Motherboard
Microprocessor chip
Memory chips
Connections to other
parts of the hardware
Additional chips may be
added math
coprocessor

The System Unit


The Black Box
Storage
Devices
Hard drive
Floppy drive
CD-ROM drive
DVD-ROM drive

Microprocessor Components

Control Unit CU
Arithmetic / Logic Unit ALU
Registers
System clock

Types of Microprocessors

Intel
Pentium
Celeron
Xeon and Itanium

Intelcompatible
Cyrix
AMD

Types of Microprocessors
PowerPC
Cooperative efforts of Apple, IBM, and
Motorola
Used in Apple Macintosh family of PCs
Found in servers and embedded systems

Alpha
Manufactured by Compaq
High-end servers and workstations

Semiconductor Memory

Reliable
Compact
Low cost
Low power usage
Mass-produced economically
Volatile
Monolithic
All circuits together constitute an inseparable unit of
storage

Semiconductor Memory
CMOS
Complementary metal oxide
semiconductor
Uses little electricity
Used in PC to store hardware settings
that are needed to boot the computer
Retains information with current from
battery

RAM
Keeps the instructions and data for current
program
Data in memory can be accessed
randomly
Easy and speedy access
Volatile
Erased
Written over

Types of RAM
SRAM
Retains contents as long as power
is maintained
Faster than DRAM

Types of RAM
DRAM
Must be constantly refreshed
Used for most PC memory because of
size and cost
SDRAM
Retains contents as long as power is
maintained
faster type of DRAM

Rambus DRAM
Faster than SDRAM
Expensive

Adding RAM
Purchase memory modules that are
packaged on circuit boards
SIMMS Chips on one side
DIMMS Chips on both sides
Maximum amount of RAM that can be
installed is based upon the
motherboard design

ROM
Programs and data that are permanently
recorded at the factory
Read
Use
Cannot be changed by the user
Stores boot routine that is activated when
computer is turned on
Nonvolatile

PROM
Programmable ROM
ROM burner can change instructions
on some ROM chips

Bus Line
Paths that transport electrical signals
System bus
Transports data between the CPU Input/
Output modules (I/O) and memory

Bus width
Number of bits of data that can be carried
at a time
Normally the same as the CPUs word size

Speed measures in MHz

Bus Line
Larger bus width

More powerful
computer

CPU can transfer more


data at a time

Faster computer

More memory
available

CPU can reference


larger memory
addresses

CPU can support a greater number and


variety of instructions

Expansion Buses
Connect the motherboard to expansion
slots
Plug expansion boards into slots
interface cards
adapter cards

Provides for external connectors / ports


Serial
Parallel

Expansion Buses

PC Buses and Ports


ISA

Slow-speed devices like mouse, modem

PCI

High-speed devices like hard disks and network cards

AGP

Connects memory and graphics card for faster video


performance

USB

Supports daisy-chaining eliminating the need for


multiple expansion cards; hot-swappable

IEEE 1394 High-speed bus connecting video equipment to the


(FireWire) computer
PC Card

Credit card sized PC card devices normally found on


laptops

Speed and Power


What makes a computer fast?

Microprocessor speed
Bus line size
Availability of cache
Flash memory
RISC computers
Parallel processing

Computer Processing Speed


Time to execute an instruction
Millisecond
Microsecond
Nanosecond
Modern computers

Picosecond
In the future

Microprocessor Speed
Clock speed
Megahertz (MHz)
Gigahertz (GHz)

Number of instructions per second


Millions of Instructions Per Second (MIPS)

Performance of complex mathematical


operations
One million floating-point operations per
second (Megaflop )

Cache
Short-term storage.
A cache is used to speed up certain computer
operations by temporarily placing data, or a copy of it,
in a location where it can be accessed more rapidly
than normal. For example, data from a storage disk
may be cached temporarily in high-speed memory so
that it can be read and written more quickly than if it
had to come directly from the disk itself; or a
microprocessor may use an an on-board memory cache
to store temporary data for use during operations.
Cache' is derived from the French word for a hiding
place, and so is pronounced like 'cash'.
Features
Small block of very fast temporary memory
Speed up data transfer
Instructions and data used most frequently or most
recently

Cache
P
R
O
C
E
S
S
O
R

Step 3
Transfer to main CPU and cache

Step 1
Processor
requests
data or
instruction
s

R
Cache

A
M

Step 2
Go to address in main
memory and read
Next processor request
Look first at cache
Go to memory

Types of Cache
Internal cache
Level 1 (L1)
Built into microprocessor
Up to 128KB

External cache

Level 2 (L2)
Separate chips
256KB or 512 KB
SRAM technology
Cheaper and slower than L1
Faster and more expensive than memory

Flash Memory
Nonvolatile RAM
Used in
Cellular phones
Digital cameras
Digital music recorders
PDAs

Instruction Sets
CISC Technology
Complex Instruction Set Computing
Conventional computers
Many of the instructions are not used

RISC Technology

Reduced Instruction Set Computing


Small subset of instructions
Increases speed
Programs with few complex instructions
Graphics
Engineering

Types of Processing
Serial processing
Execute one instruction at a time
Fetch, decode, execute, store

Parallel Processing
Multiple processors used at the same time
Can perform trillions of floating-point
instructions per second (teraflops)
Ex: network servers, supercomputers

Types of Processing

Pipelining
Instructions action need not be complete
before the next begins
Fetch instruction 1, begin to decode and
fetch instruction 2

You might also like