the computer processor l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
The Computer Processor PowerPoint Presentation
Download Presentation
The Computer Processor

Loading in 2 Seconds...

play fullscreen
1 / 16

The Computer Processor - PowerPoint PPT Presentation


  • 165 Views
  • Uploaded on

The Computer Processor. A closer look. When a program is run, program and data are copied from the hard drive into Main Memory. Program. HARD DISK. MAIN MEMORY. A simple program that has been copied from the hard drive and put into main memory.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'The Computer Processor' - nyx


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
when a program is run program and data are copied from the hard drive into main memory
When a program is run, program and data are copied from the hard drive into Main Memory

Program

HARD DISK

MAIN MEMORY

a simple program that has been copied from the hard drive and put into main memory
A simple program that has been copied from the hard drive and put into main memory

von-Neuman machine-Stored Program Approach. Where both the data and program stored in main memory

fetch decode execute
Fetch-Decode-Execute
  • Fetch: The next instruction is fetched from Main Memory.
  • Decode: The instruction gets interpreted/decoded, signals produced to control other internal components (ALU for example).
  • Execute: The instructions get executed (carried out)
slide5
The processor contains a number of special purpose registers.
  • A register is an extremely fast piece of on-chip memory used for small temporary storage.
  • Each of the special purpose registers have an important role, when a series of program instructions are fetched-decoded-executed.
special purpose registers
Special purpose registers

R0

R1

R2

R3

R4

R5

General purpose registers

Arithmetic Logic Unit

Current Instruction Register

Program Counter

Status Register

Control Unit

Memory Address Register

Memory Data Register

the program counter
The Program Counter

R0

R1

R2

R3

R4

R5

The program counter holds the address of the next instruction that is to be fetched-decoded-executed. This will increment automatically as the current instruction is being decoded.

Arithmetic Logic Unit

Current Instruction Register

Program Counter:

500

Status Register

Control Unit

Memory Address Register

Memory Data Register

memory address register mar
Memory Address Register (MAR)

R0

R1

R2

R3

R4

R5

The Memory Address Register (MAR) holds the address of the current instruction being executed. It points to the relevant location in memory where the required instruction is (at this stage the address is simply copied from the Program Counter).

Arithmetic Logic Unit

Current Instruction Register

Program Counter:

500

Status Register

Control Unit

Memory Address Register:

500

Memory Data Register

MAR  [PC] (contents of Program Counter copied to the Memory Address Register)

memory data register mdr or mbr
Memory Data Register (MDR or MBR)

R0

R1

R2

R3

R4

R5

The Memory Data Register can contain both instructions and data. At this stage, an instruction has been fetched and is being stored here en route to the Current Instruction Register. The instruction is copied from the memory location pointed to by the MAR.

Arithmetic Logic Unit

Current Instruction Register

Program Counter:

500

Status Register

Control Unit

Memory Address Register:

500

Memory Data Register: LDA 1000

MBR  [Memory] addressed

(Contents of addressed memory is copied to the memory buffer register)

current instruction register cir
Current Instruction Register (CIR)

R0

R1

R2

R3

R4

R5

The Current Instruction Register is used to store the current instruction to be decoded and executed (copied from the MDR).

Arithmetic Logic Unit

Current Instruction Register:

LDA 1000

Program Counter:

500

Status Register

Control Unit

Memory Address Register:

500

Memory Data Register:

LDA 1000

CIR  [MBR]

(If contents of MBR is an instruction then it is copied to the Current Instruction Register)

decoding and executing the instruction
Decoding and executing the instruction

R0

R1

R2

R3

R4

R5

The instruction in the CIR gets decoded. In this example, the instruction is telling the processor to load the value in memory location 1000 (03) to the accumulator (one of the general purpose registers are usually used for the accumulator). As this happens the Program Counter automatically increments.

Arithmetic Logic Unit

Current Instruction Register:

LDA 1000

Program Counter:

503

Status Register

Control Unit

Memory Address Register:

500

Memory Data Register:

LDA 1000

PC  [PC] + 1

[CIR] decoded and executed

the control unit
The Control Unit

R0

R1

R2

R3

R4

R5

The control unit co-ordinates all of these fetch-decode-execute activities. At each clock pulse, it controls the movement of data and instructions between the registers, main memory and input and output devices.

Arithmetic Logic Unit

Current Instruction Register:

LDA 1000

Program Counter:

503

Status Register

Control Unit

Memory Address Register:

1000

Memory Data Register:

03

status register
Status Register

R0

R1

R2

R3

R4

R5

The Status Register stores a combination of bits used to indicate the result of an instruction. For example one bit will be set to indicate that an instruction has caused an overflow. Another bit will be set to indicate that the instruction produced a negative result. The Status Register also indicates whether an interrupt has been received (we will look at this later).

Arithmetic Logic Unit

Current Instruction Register:

LDA 1000

Program Counter:

503

Status Register

Control Unit

Memory Address Register:

1000

Memory Data Register:

03

arithmetic logic unit
Arithmetic Logic Unit

R0

R1

R2

R3

R4

R5

The Arithmetic Logic Unit carries out any arithmetic and logical operations (calculations and value comparisons) required by any instruction that is executed. For example instruction at 503 would require the Arithmetic Logical Unit to add the number in location 1001 to the value already in the accumulator.

Arithmetic Logic Unit

Current Instruction Register:

LDA 1000

Program Counter:

503

Status Register

Control Unit

Memory Address Register:

1000

Memory Data Register:

03

special purpose registers15
Special Purpose Registers

R0

R1

R2

R3

R4

R5

Arithmetic Logic Unit

Current Instruction Register:

LDA 1000

So why use special purpose registers for all of this passing of data and instructions, rather than using main memory?

Program Counter:

503

Status Register

Control Unit

Memory Address Register:

1000

Memory Data Register:

03