Presentation is loading. Please wait.

Presentation is loading. Please wait.

Stored program concept

Similar presentations


Presentation on theme: "Stored program concept"— Presentation transcript:

1 Stored program concept
stored program concept - a program must be in main memory in order for it to be executed. The instructions are fetched, decoded and executed one at a time Building on the Von Neumann architecture we get the idea of how the stored program concept works. If you have ever loaded a game on a console you might notice that: you need to insert a disc the disc whirrs the game says loading the game plays This is the stored program concept in motion! Let's take apart what is happening: You insert an optical disk (secondary storage) with the code on The code is loaded (whirrs) into main memory The processor fetches, decodes and executes instructions from main memory to play game

2 Stored program concept
C.P.U.

3 Processor Function Processor must: Fetch instructions
Interpret/decode instructions Fetch data Process data Write data 22

4 Processor With Systems Bus

5 Registers CPU must have some working space (temporary storage) - registers Number and function vary between processor designs - one of the major design decisions Top level of memory hierarchy 23

6 General Purpose and Dedicated Registers
General purpose registers are available to store any addresses or data required by the program. Dedicated registers are usually used for specific functions such as maintaining control. For example, when a program is interrupted its state, i.e. the value of the registers such as the program counter, instruction register or memory address register - may be saved into dedicated registers, ready for recall when the program is ready to start again. In general the more registers a CPU has available, the faster it can work.

7 Some Important Registers
Program Counter (PC) Instruction Register (IR) Memory Address Register (MAR) – connects to address bus Memory Buffer Register (MBR) – connects to data bus, feeds other registers 30

8 Control and Status Register
A set of bits Condition Codes: Sign (of last result) Zero (last result) Carry (multiword arithmetic) Parity(odd or even) Overflow 31

9 BSOD When a system malfunctions, as in the case of a Blue Screen of Death, the monitor will usually display a message and multiple numbers. There numbers are the contents of the register and other key memory locations. This information is usually not overly useful for computer technician, but it can provide a great deal of information to developer and technical support professinals as to the nature of the failure. It is a good idea to capture that information before you contact customer support.

10 The ALU The Arithmetic Logic Unit or the ALU is a digital circuit that performs arithmetic and logical operations. Where arithmetic operations include things such as ADD and SUBTRACT and the logical operations include things such as AND, OR, NOT. The ALU is a fundamental building block in the central processing unit (CPU) of a computer. ADD ;add one number to another number SUB ;subtract one number to another number INC ;increment a number by 1 DEC ;decrements a number by 1 MUL ;multiply numbers together OR ;boolean algebra function AND ;boolean algebra function NOT ;boolean algebra function XOR ;boolean algebra function JNZ ;jump to another section of code if a number is not zero (used for loops and ifs) JZ ;jump to another section of code if a number is zero (used for loops and ifs)

11 Control Unit Coordinates the fetching of program code from main memory to the CPU and directs the operation of the other processor components by providing timing and control signals.

12 Clocks Processor clock - A timing device connected to the processor that synchronises when the fetch, decode execute cycle runs Clock speed - The number of cycles that are performed by the CPU per second Clock speed is measured in Hertz, which means 'per second'. You have probably heard of clock speeds such as 1 MHz, this means 1,000,000 cycles per second and potentially a million calculations. A computer of speed 3.4 GHz means it might be capable of processing 3,400,000,000 instructions per second!

13 Match the following components to the numbers on the diagram: Processor, Data bus, Main memory, Keyboard, Secondary storage, Address bus, Clock, Monitor, VDU controller, disk controller, keyboard controller 10 4 2 1 11 5 3 12 6 7 8 9


Download ppt "Stored program concept"

Similar presentations


Ads by Google