Download presentation
Presentation is loading. Please wait.
Published byLoreen Lawson Modified over 8 years ago
1
Session 4 Teaching Computing to GCSE Level with Python
2
From the specification OCR GCSE Computing state the purpose of the CPU describe the function of the CPU as fetching and executing instructions stored in memory explain how common characteristics of CPUs such as clock speed, cache size and number of cores affect their performance. AQA GCSE Computer Science be able to categorise devices as input or output depending on their function be able to describe the purpose of the processor (CPU) understand how different components link to a processor (ROM, RAM, I/O, Storage, etc) be able to explain the effect of common CPU characteristics on the performance of the processor. These should include clock speed, number of cores and cache size/types
3
Key areas to teach Purpose of the CPU Fetch-execute cycle Characteristics of the CPU affecting performance Clock Speed Cache size Number of cores See handout: A451 2.1.2 CPU Student Notes.pdf from OCR for a good intro
4
Purpose of the CPU Controls the computer Fetches and executes instructions
5
Simple Computer System Central Processing Unit Secondary Store or Backing Store (e.g. Magnetic Disk) Keyboard Visual Display Unit Main Memory or Immediate Access Store Processor Keyboard Input Controller VDU Output Controller (Disk) I/O Controller Control Bus Data Bus Address Bus Peripheral devices
6
Fetch and execute cycle The fetch execute cycle is the time period of which the computer reads and processes the instructions from the memory, and executes them. This process is a continuous cycle which is used until the computer is turned off or there are no more instructions to process. Fetch instructions being collected either from memory Execute After the correct instructions have been fetched the CPU will then interpret what the instruction is telling it to do then it will simply execute the instruction and the whole process will begin again Repeat the whole process will begin again until there are no more instructions or the computer is turned off.
7
Useful resources Scratch animation of the Fetch Execute Cycle Scratch animation of the Fetch Execute Cycle Here’s another animation Here’s another animation GCSE Computing revision video GCSE Computing revision video Royal Institution Lectures Royal Institution Lectures
8
The control unit The control unit is one of the most important parts of a microprocessor for the reason that it is in charge of the entire process, that is the machine cycle. The CPU deals with each instruction it is given in a series of steps. Each step is repeated for each instruction. This series of steps is called the machine cycle. It involves: fetching an instruction from memory; decoding the instruction; transferring the data; executing the instruction.
9
ALU ( A rithmetic L ogic U nit) The high-speed CPU circuit that does calculating and comparing. Numbers are transferred from memory into the ALU for calculation, and the results are sent back into memory.
10
Activity – role play Work in threes One person to be: The Display The Memory The Computer Carry out the instructions given Role Plan activity taken from: http://cse4k12.org/how_computers_work
11
What affects performance? Clock speed Cache size Number of cores
12
Clock speed CPU speed is often measured in Hertz [Hz] which is simply cycles per second. One thousand Hertz = 1kHz (kilohertz) One million Hertz = 1MHz (Megahertz One billion Hertz = 1GHz (Gigahertz) One thousand billion Hertz = 1 THz (Terahertz)
13
Cache A CPU cache is a cache used by the central processing unit of a computer to reduce the average time to access memory. The cache is a smaller, faster memory which stores copies of the data from the most frequently used main memory locations. As long as most memory accesses are cached memory locations, the average latency of memory accesses will be closer to the cache latency than to the latency of main memory.
14
Cache When the microprocessor accesses the main memory (RAM) it does it in about 60 nanoseconds (60 billionths of a second). Microprocessors have cycle times of approx 2 nanoseconds – much faster A L2 cache is a special memory bank in the motherboard, small but very fast (about 30 nanoseconds). So twice as fast as accessing main memory An L1 cache is an even smaller, but faster, memory system built directly in the microprocessor’s chip. This will be accessed at the speed of the microprocessor
15
Generations of programming language 1 st generation - machine code 2 nd generation – assembly language 3 rd generation (and up) – high level language
16
Assembly Language mneunomics INP OUT HLT STA LDA DAT
17
Little Man Computer Click on heading ↑ for LMC Work through examples on website
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.