Download presentation
Presentation is loading. Please wait.
Published byShannon Shepherd Modified over 9 years ago
1
Week 2
2
Understand what the processor is and what it does. Execute basic LMC programs. Understand how CPU characteristics affect performance.
3
A computer system is made up of hardware and software components and is capable of:hardwaresoftware data input - using input devices data processing - using a microprocessor, typically the Central Processing Unit (CPU)Central Processing Unit 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.
4
What does the processor do?
5
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.
6
This involves retrieving an instruction from a memory address. The address of the instruction is stored in a register called the program counter (PC).register After an instruction is fetched, the PC is updated so the CPU knows the address of the next instruction it has to fetch.
7
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.
8
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.data bus 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.
9
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.iteration loopsconditional 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.
10
http://www.atkinson.yorku.ca/~sychen/resear ch/LMC/LMCHome.html 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.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.