16
PROCESSOR AND MEMORY Rose angel

The cpu and memory (2)

Embed Size (px)

Citation preview

Page 1: The cpu and memory (2)

PROCESSOR AND MEMORYRose angel

Page 2: The cpu and memory (2)

ALU (arithmetic logic unit) Performs calculations and comparisons (data changed) CU (control unit): performs fetch/execute cycle Functions: Moves data to and from CPU registers and other hardware

components (no change in data) Accesses program instructions and issues commands to the ALU Subparts: Memory management unit: supervises fetching instructions and

data I/O Interface: sometimes combined with memory management

unit as Bust Interface Unit Registers Example: Program counter (PC) or instruction pointer determines

next instruction for execution

CPU: 3 Major Components

Page 3: The cpu and memory (2)

System Block Diagram

Page 4: The cpu and memory (2)

The Little Man Computer

Page 5: The cpu and memory (2)

Small, permanent storage locations within the CPU used for a particular purpose

Manipulated directly by the Control Unit Wired for specific function Size in bits or bytes (not MB like memory) Can hold data, an address or an instruction

Concept of Registers

Page 6: The cpu and memory (2)

Use of Registers Scratchpad for currently executing program Holds data needed quickly or frequently Stores information about status of CPU and currently

executing program Address of next program instruction Signals from external devices General Purpose Registers User-visible registers Hold intermediate results or data values, e.g., loop

counters Equivalent to LMC’s calculator Typically several dozen in current CPUs

Registers

Page 7: The cpu and memory (2)

Program Count Register (PC) Also called instruction pointer Instruction Register (IR) Stores instruction fetched from memory Memory Address Register (MAR) Memory Data Register (MDR) Status Registers Status of CPU and currently executing program Flags (one bit Boolean variable) to track

condition like arithmetic carry and overflow, power failure, internal computer error

Special-Purpose Registers

Page 8: The cpu and memory (2)

Stores values from other locations (registers and memory)

Addition and subtraction Shift or rotate data Test contents for conditions such as zero or

positive

Register Operations

Page 9: The cpu and memory (2)

Each memory location has a unique address Address from an instruction is copied to the

MAR which finds the location in memory CPU determines if it is a store or retrieval Transfer takes place between the MDR and

memory MDR is a two way register

Operation of Memory

Page 10: The cpu and memory (2)

Relationship between MAR, MDR and Memory

Page 11: The cpu and memory (2)

Individual Memory Cell

Page 12: The cpu and memory (2)

Size of the address portion of the instruction 4 bits allows 16 locations 8 bits allows 256 locations 32 bits allows 4,294,967,296 or 4 GB Important for performance Insufficient memory can cause a processor

to work at 50% below performance

Memory Capacity

Page 13: The cpu and memory (2)

DRAM (Dynamic RAM) Most common, cheap Volatile: must be refreshed (recharged with

power) 1000’s of times each second SRAM (static RAM) Faster than DRAM and more expensive than

DRAM Volatile Frequently small amount used in cache

memory for high-speed access used

RAM: Random Access Memory

Page 14: The cpu and memory (2)

Non-volatile memory to hold software that is not expected to change over the life of the system

Magnetic core memory EEPROM Electrically Erasable Programmable ROM Slower and less flexible than Flash ROM Flash ROM Faster than disks but more expensive Uses BIOS: initial boot instructions and diagnostics Digital cameras

ROM - Read Only Memory

Page 15: The cpu and memory (2)

Printed circuit board that holds CPU and related components including backplane

Motherboard

Page 16: The cpu and memory (2)

Typical PC Interconnections