Presentation is loading. Please wait.

Presentation is loading. Please wait.

Objectives Describe common CPU components and their function: ALU Arithmetic Logic Unit), CU (Control Unit), Cache Explain the function of the CPU as.

Similar presentations


Presentation on theme: "Objectives Describe common CPU components and their function: ALU Arithmetic Logic Unit), CU (Control Unit), Cache Explain the function of the CPU as."— Presentation transcript:

1 Objectives Describe common CPU components and their function: ALU Arithmetic Logic Unit), CU (Control Unit), Cache Explain the function of the CPU as fetch and execute instructions stored in memory

2 The main components of a computer
MAIN MEMORY (RAM) SECONDARY STORAGE CENTRAL PROCESSING UNIT (CPU) INPUT DEVICES OUTPUT

3 The CPU

4 Central Processing Unit (CPU)
The Central Processing Unit or CPU is arguably the most important component of a computer What does it do? If it was one organ in the human body what would it be?

5 Central Processing Unit (CPU)
You can think of the CPU as being like the brain in a human It is responsible for all of a computer’s processing It processes data by performing the fetch-decode- execute cycle.

6 Fetch – Decode – Execute cycle
The CPU operates by repeating three operations: FETCH – causes the next instruction and any data involved to be fetched from main memory (RAM) DECODE – decodes the instruction EXECUTE – carries out the instruction Repeat…

7 Registers in the CPU Program Counter Control Unit ALU Accumulator

8 Registers in the CPU Program Counter: A special purpose register that holds the address of the next instruction to be executed The Accumulator: Holds data, such as numbers during arithmetic calculations Program Counter Accumulator

9 Program Counter 1 2 3 4 5 LDA 28 6 ADD #2 7 STO 10 8 9 10 11 12 The Program Counter points to the next instruction that needs to be executed It is located in the Control Unit The Program Counter is incremented after fetching an instruction This moves it on to point to the next instruction to be executed Program Counter 5

10 Accumulator The accumulator is where arithmetic and logic results are temporarily stored much like the M+ function on a calculator Without the accumulator, it would be necessary to write the result of each calculation to main memory The accumulator speeds up the storage and retrieval of calculations

11 The Arithmetic Logic Unit
The ALU or Arithmetic Logic Unit performs: Logical operations, shift operations and arithmetic operations Accumulator 8 ALU Main Memory X = 3 Y = 5 ADD X, Y

12 MAR (Memory Address Register) MDR (Memory Data Register)
Memory registers With the von Neumann architecture, both the instructions and the data are stored together in RAM Two registers are required to implement this: MAR (Memory Address Register) MDR (Memory Data Register)

13 MAR (Memory Address Register)
The MAR holds the address of the current instruction being executed The MAR knows the location of the data that needs to be accessed It keeps track of where data is located MAR (Memory Address Register)

14 MDR (Memory Data Register)
The MDR holds the actual data that is being stored in RAM It acts as a buffer and holds data that is copied from RAM, ready for the CPU to process it MDR (Memory Data Register)

15 MAR (Memory Address Register) MDR (Memory Data Register)
Working together MAR (Memory Address Register) MDR (Memory Data Register) The two work together; The MAR knows where to look for data in RAM, the MDR keeps hold of that data until it’s ready to be used by the CPU Memory MAR (Memory Address Register) MDR (Memory Data Register)

16 Control Unit The control unit coordinates all of the activities taking place within the CPU Much like the conductor of an orchestra

17 Processor registers ALU: Temporarily stores arithmetic and logic results PC: Points to the next instruction MDR: Stores the actual data CIR (Current Instruction Register): Holds the current instruction to be executed MAR: Stores the address of the data


Download ppt "Objectives Describe common CPU components and their function: ALU Arithmetic Logic Unit), CU (Control Unit), Cache Explain the function of the CPU as."

Similar presentations


Ads by Google