Upload
dalit
View
53
Download
0
Tags:
Embed Size (px)
DESCRIPTION
Session 4. Teaching Computing to GCSE Level with Python. 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 - PowerPoint PPT Presentation
Citation preview
Session 4Teaching Computing to GCSE Level with Python
From the specificationOCR 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 Sciencebe 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
Key areas to teach
Purpose of the CPUFetch-execute cycleCharacteristics of the CPU affecting
performanceClock SpeedCache sizeNumber of cores
See handout: A451 2.1.2 CPU Student Notes.pdf from OCR for a good intro
Purpose of the CPUControls the computerFetches and executes instructions
Simple Computer SystemCentral Processing Unit
Secondary Store orBacking Store
(e.g. Magnetic Disk)
KeyboardVisual
DisplayUnit
Main Memoryor
Immediate Access Store
Processor
Keyboard
InputControlle
r
VDUOutput
Controller
(Disk) I/O Controller
Control BusData BusAddress BusPeripheral
devices
Fetch and execute cycleThe 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.
Useful resourcesScratch animation of the Fetch Execute CycleHere’s another animationGCSE Computing revision videoRoyal Institution Lectures
The control unitThe 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.
ALU(Arithmetic Logic Unit) 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.
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
What affects performance? Clock speed Cache size Number of cores
Clock speedCPU 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)
CacheA 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.
CacheWhen 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
Generations of programming language1st generation - machine code
2nd generation – assembly language
3rd generation (and up) – high level language
Assembly Language mneunomics INPOUTHLTSTALDADAT
Little Man ComputerClick on heading ↑ for LMC Work through examples on website