Week 2 - GCSE Computing

Download Report

Transcript Week 2 - GCSE Computing

Week 2



Understand what the processor is and what it
does.
Execute basic LMC programs.
Understand how CPU characteristics affect
performance.









A computer system is
made up of hardware and software components and is capable of:
data input - using input devices
data processing - using a microprocessor, typically the Central Processing
Unit (CPU)
data output - using output devices
It may also be capable of:
data storage - so data can be stored for later use
data transmission - so data can be transferred to another computer
system
As well as the personal computer, this definition applies to any
equipment which uses computer technology.
What does the processor do?


The purpose of the Central Processing Unit
(CPU) is to carry out program instructions.
The function of the CPU can be broken down
into a series of steps that are carried out in a
continuous cycle.


This involves retrieving an instruction from a
memory address. The address of the
instruction is stored in a register called the
program counter (PC).
After an instruction is fetched, the PC is
updated so the CPU knows the address of the
next instruction it has to fetch.


This involves the CPU identifying the
operation code (op-code) part of the
instruction which tells it which operation to
perform.
If the op-code requires the CPU to act on
some data then the second part of the
instruction will contain either the data or the
memory address where the data is stored.
In this step the parts of the CPU are connected
that are needed to execute the instruction that
was decoded.
 For example, if the instruction involved integer
arithmetic or logical operations then the
arithmetic logic unit (ALU) would be connected
to the relevant memory locations so that:
 The data for the calculation can be passed along
a data bus to the ALU as input.
 The ALU can execute the required operation
 The result of the operation can then be passed
from the ALU along a data bus as output.

In this step the result of the execute step is either written
to RAM or, if it is to be used by the next instruction, to one
of the CPU registers.
 Some types of instructions alter the program counter
rather than produce result data. This allows programs to
carry out iteration loops and conditional program
execution rather than just stepping through the
instructions in sequence.
 Some instructions change the state of single-bit flag
registers. These TRUE/FALSE registers are used to
indicate the result of an execute step, for example a flag
can be set to TRUE if two numbers are compared and
found to be equal or if a subtraction produces a zero or a
negative result.







http://www.atkinson.yorku.ca/~sychen/resear
ch/LMC/LMCHome.html
Run the applet.
Go through examples.
Work through worksheet 1, 2 and 3.
Complete LMC sheet 2
Research recent, commercially available
CPU’s, and their characteristics, present your
findings in a PPt.