Download presentation
Presentation is loading. Please wait.
1
CPU Lesson 2
2
Von Neumann Architecture
Control unit coordinates all of the activities taking place inside of the CPU. Summaries as follows: It controls the execution of instructions in the correct sequence It decodes instructions It regulates and controls processor timing using regular pulses from the system clock It sends and receives control signals to and from other devices within the computer Arithmetic and ALU carry out the following instructions: Logical Operations: AND,OR, NOT Shift Operations: Bits in the computer world can be shifted left and right by a certain number of places Arithmetic Operations: Addition, subtraction, multiplication and division
3
Learning Objectives To be able to label an internal diagram of the CPU
To be able to describe the roles of the MAR and the MDR in the fetch part of the fetch-execute cycle To be able to describe the purpose of the accumulator To be able to explain the purposes of the ALU, CU and the cache
4
Engagement - Activity 1 On the Diagram Given…
Use research to try and identify the terms on the sheet Write the definitions/explanations of what they do in the boxes Then try and label the diagram accurately
5
Activity 1 - Answers Processor Main Memory 0001 INP Address Bus 0010
0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 INP Add 5 STO 8 ADD 8 PC MAR CIR MDR Data Bus Program Counter Main Address Register – hold address (location in memory) of the instruction or piece of data to be fetched or stored Main Data Register - contains the data to be stored in the computer storage (e.g. RAM), or the data after a fetch from the computer storage Current Instruction Register – holds the current instruction to be executed, having been fetched from memory. Arithmetic Logic Unit – carries out calculations on the data. +, *, -, / Accumulator - accumulator is a register in which intermediate arithmetic and logic results are stored. Registers are very fast memory locations within the CPU used in the execution of instructions ALU Accumulator
6
Key Words Von Neumann Architecture ALU (Arithmetic Logic Unit)
MAR (Memory Address Register) MDR (Memory Data Register) Program Counter Accumulator ALU (Arithmetic Logic Unit) CU (Control Unit) Cache Fetch/Execute Busses Registers - A special, high-speed storage area within the CPU. All data must be represented in a register before it can be processed. For example, if two numbers are to be multiplied, both numbers must be in registers, and the result is also placed in a register. (The register can contain the address of a memory location where data is stored rather than the actual data itself.)
7
Computer Systems Internal Components The processor
Main memory (RAM, ROM, EEPROM) I/O controllers Buses External components (peripherals) Keyboard, mouse, printer, disk drives I/O Devices / I/O Ports Secondary Storage Electrically Erasable Programmable Read-Only Memory
8
The Processor The “brains” of the computer
Carries out instructions (Executes Instructions) Processes Data Retrieves Data/Instructions from Main Memory (Fetch) Stores Data into Main Memory once Executed
9
Main Memory RAM – Random Access Memory
Holds Data and Instructions that are currently in use by the processor Located on the Motherboard Directly Accessible by the processor All data/instructions are lost once power is turned off
10
Main Memory ROM – Read Only Memory
Instructions are permanently etched onto a ROM Chip When power is turned off – instructions still remain on the ROM chip. Bootstrap Loader is held in ROM Gives the instructions to start up the Operating System
11
System Busses A bus is a set of parallel wires connecting two or more independent components of a computer system in order to pass signals between them. The System is split into three separate busses: The data bus The address bus The control bus A system bus is a single computer bus that connects the major components of a computer system, combining the functions of a data bus to carry information, an address bus to determine where it should be sent, and a control bus to determine its operation.
12
Address Bus Carries addresses from the Processor to main memory or other I/O devices It is one direction (Uni-Directional) The processor generates an address All data/Instructions are returned on the Data Bus An address bus is a computer bus architecture used to transfer data between devices that are identified by the hardware address of the physical memory (the physical address), which is stored in the form of binary numbers to enable the data bus to access memory storage.
13
Data Bus Carries Data/Instructions from Main Memory to the Processor (or from other secondary storage devices) to the processor. Bi-Directional (two way) Data can be read/written A data bus is a system within a computer or device, consisting of a connector or set of wires, that provides transportation for data.
14
Control Bus Control signals are sent along the control bus
E.g. Memory Read, Memory Write This instructs which was data will be travelling to/from memory.
15
Peripherals Peripherals are any devices that are not directly connected to the CPU E.g. mouse, keyboard, printer, hard disk drive, cd-rom drive These devices are known as I/O devices (Input/Output Devices)
16
I/O Ports I/O Ports allow communication from an I/O device and the motherboard (hence CPU)
17
Secondary Storage Used for long term storage of data and instructions
Hard Disk Drive Solid State Drive Flash Memory DVD-R Blu-ray
18
Processor Control bus (read/write Signals) Processor Main Memory
Address bus System Clock Hz Data bus
19
CPU Fetch-execute cycle
The basic operation of a computer is called the ‘fetch-execute’ cycle. The computer fetches the instruction from its memory and then executes it. This is done repeatedly from when the computer is booted up to when it is shut down
20
What Happens in the Fetch – Decode – Execute cycle?
Fetch part of the cycle Program counter is incremented for each instruction of the program being executed The contents of the Program Counter are put into the MAR (Memory Address Register) The address is transferred along the Address Bus to Main Memory (this address indicates which part of memory to fetch the data/instructions from A program counter is a register in a computer processor that contains the address (location) of the instruction being executed at the current time. As each instruction gets fetched, the program counter increases its stored value by 1. After each instruction is fetched, the program counter points to the next instruction in the sequence. When the computer restarts or is reset, the program counter normally reverts to 0.
21
What Happens in the Fetch – Decode – Execute cycle?
Fetch part of the cycle The data/instruction that has been addressed is transferred back to the processor along the data bus This is held in the Memory Data Register The instruction would then be transferred to the Current Instruction Register. Current Instruction Register - This holds the current instruction to be executed, having been fetched from memory.
22
Processor - Registers PC – Program Counter
Holds the location of the next instruction/data address in Main Memory MAR – Memory Address Register The contents of the PC are copied here and then transferred along the Address Bus Main Memory PC MAR Address Bus
23
Processor - Registers MDR – Memory Data Register
Once Data/Instructions are brought from the Memory Address in Main Memory – they are placed in the MDR. CIR – Current Instruction Register The instructions stored in the MDR are copied here Main Memory Current Instruction Register - This holds the current instruction to be executed, having been fetched from memory. CIR MDR Data Bus
24
What Happens in the Fetch – Decode – Execute cycle?
Decode / Execute Part The instruction to be decoded is held in the Current Instruction Register The instruction is split into an Op-Code and an Operand The instruction is carried out by the ALU (Arithmetic Logic Unit) Op-Code short for Operational code
25
Executing Instructions
ALU (Arithmetic Logic Unit) Performs arithmetic and logical operations including +, -, AND, OR Accumulator Results of calculations are placed into the Accumulator Accumulator ALU
26
Activity 2 Produce a Labelled Diagram of the Internal Components of a Computer System See Lesson 2 Activity 2 In Pairs Describe in words how the Fetch-Execute Cycle Works
27
Control Unit Sends Control Signals between the different internal components Memory Read Memory Write Hard Disk Drive Read I/O Write
28
Plenary Questioning Produce Question + Mark Scheme
Exit Pass – Describe the differences between the registers on the processor Exit Pass – Describe the differences between the ALU and the CU
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.