session 4 teaching computing to gcse level with python

17
Session 4 Teaching Computing to GCSE Level with Python

Upload: loreen-lawson

Post on 18-Jan-2018

231 views

Category:

Documents


2 download

DESCRIPTION

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: A CPU Student Notes.pdf from OCR for a good intro

TRANSCRIPT

Page 1: Session 4 Teaching Computing to GCSE Level with Python

Session 4Teaching Computing to GCSE Level with Python

Page 2: Session 4 Teaching 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

Page 3: Session 4 Teaching Computing to GCSE Level with Python

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

Page 4: Session 4 Teaching Computing to GCSE Level with Python

Purpose of the CPUControls the computerFetches and executes instructions

Page 5: Session 4 Teaching Computing to GCSE Level with Python

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

Page 6: Session 4 Teaching Computing to GCSE Level with Python

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.

Page 7: Session 4 Teaching Computing to GCSE Level with Python

Useful resourcesScratch animation of the Fetch Execute CycleHere’s another animationGCSE Computing revision videoRoyal Institution Lectures

Page 8: Session 4 Teaching Computing to GCSE Level with Python

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.

Page 9: Session 4 Teaching Computing to GCSE Level with Python

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.

Page 10: Session 4 Teaching Computing to GCSE Level with Python

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

Page 11: Session 4 Teaching Computing to GCSE Level with Python

What affects performance? Clock speed Cache size Number of cores

Page 12: Session 4 Teaching Computing to GCSE Level with Python

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)

Page 13: Session 4 Teaching Computing to GCSE Level with Python

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.

Page 14: Session 4 Teaching Computing to GCSE Level with Python

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

Page 15: Session 4 Teaching Computing to GCSE Level with Python

Generations of programming language1st generation - machine code

2nd generation – assembly language

3rd generation (and up) – high level language

Page 16: Session 4 Teaching Computing to GCSE Level with Python

Assembly Language mneunomics INPOUTHLTSTALDADAT

Page 17: Session 4 Teaching Computing to GCSE Level with Python

Little Man ComputerClick on heading ↑ for LMC Work through examples on website