23
the processor and main memory chapter 4, chapter 4, Exploring the Digital Domain Exploring the Digital Domain The Development and Basic Organization of Computers

The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

  • View
    224

  • Download
    0

Embed Size (px)

Citation preview

Page 1: The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

the processor and main memory

chapter 4,chapter 4,Exploring the Digital DomainExploring the Digital Domain

The Development and Basic Organization of Computers

Page 2: The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

based on stored program design

Processor memory input/output system

– input/output devices

– secondary storage

Electronic Digital Computers

Processor

Page 3: The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

manages the instruction-execution cycle FETCH – DECODE – EXECUTE coordinates the activities of other devices

The Processor

Page 4: The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

(fast access) storage device for preserving binary data and instructions

memory is divided into units or words each is usually a standard size or fixed-

length each memory word has a unique address for

random access

Main Memory

Page 5: The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

Random Access Memory (RAM)– readable

– writable

– usually volatile (e.g., Dynamic RAM or DRAM)

– general storage

Read Only Memory (ROM)– readable

– permanent

– nonvolatile

– special-purpose storage for data and instructions

Main Memory

Page 6: The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

Temporary Holding Locations inside the Processor

Let us talk about temporary holding locations inside the processor

These locations can hold “address” or “data” or “instruction” while the same is being used

For example, when we want to read the value stored at a memory location, we use an address

This address is held in a processor register while it is being applied to the memory’s address decoding logic

Page 7: The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

The Processor and Main Memory

Page 8: The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

Some Registers

PC: Always holds the address of the next instruction to be executed

MAR: Always used by the processor when addressing the memory

MDR: Data from the memory arrives here first IR: Instruction is held here while it is decoded

and executed ACC: Scratch Register for ALU

Page 9: The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

Inside the Processor

Page 10: The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

memoryaddressregister

memoryaddressregister

Inside the Processor

Page 11: The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

memoryaddressregister

memoryaddressregister

memorydataregister

memorydataregister

Inside the Processor

Page 12: The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

memoryaddressregister

memoryaddressregister

memorydataregister

memorydataregister

programcounter

programcounter

Inside the Processor

Page 13: The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

memoryaddressregister

memoryaddressregister

instructionregister

instructionregister

memorydataregister

memorydataregister

programcounter

programcounter

Inside the Processor

Page 14: The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

memoryaddressregister

memoryaddressregister

instructionregister

instructionregister

memorydataregister

memorydataregister

programcounter

programcounter

arithmeticlogic unit

arithmeticlogic unit

Inside the Processor

Page 15: The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

memoryaddressregister

memoryaddressregister

instructionregister

instructionregister

memorydataregister

memorydataregister

programcounter

programcounter

accumulator(workregister)

accumulator(workregister)

arithmeticlogic unit

arithmeticlogic unit

Inside the Processor

Page 16: The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

memoryaddressregister

memoryaddressregister

instructionregister

instructionregister

memorydataregister

memorydataregister

programcounter

programcounter

accumulator(workregister)

accumulator(workregister)

arithmeticlogic unit

arithmeticlogic unitsystem

clocksystemclock

Inside the Processor

Page 17: The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

1. address of thenext instruction istransferred fromPC to MAR

2. the instruction islocated in memory

1. address of thenext instruction istransferred fromPC to MAR

2. the instruction islocated in memory

FETCH the instruction

Page 18: The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

3. instruction iscopied frommemory to MDR

3. instruction iscopied frommemory to MDR

FETCH the instruction

Page 19: The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

instruction istransferred to and decoded inthe IR

instruction istransferred to and decoded inthe IR

DECODE the instruction

Page 20: The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

control unitsends signalsto appropriatedevices to causeexecution of theinstruction

control unitsends signalsto appropriatedevices to causeexecution of theinstruction

EXECUTE the instruction

Page 21: The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

Execute the Instruction

The instruction is executed in the ALU

ALU is a 2-input single output unit that can accept one or two operands and produce a result

Page 22: The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

Data Movement Operations– moving data from

memory to the CPU

– moving data from memory to memory

– input and output

Arithmetic and Logical Operations– integer arithmetic

– comparing two quantities

– shifting, rotating bits in a quantity

– testing, comparing, and converting bits

Types of Processor Operations

Page 23: The processor and main memory chapter 4, Exploring the Digital Domain The Development and Basic Organization of Computers

Program Control– starting a program

– halting a program

– skipping to other instructions

– testing data to decide whether to skip over some instructions

Types of Processor Operations