Session Objectives#4 COULD explain the function and purpose of the control unit, memory unit and ALU as individual parts of a computer SHOULD explain the role that primary memory plays in computer processing MUST describe the differences between the main types of primary memory Create solutions to the Little Man Computer assignment GCSE Computing#BristolMet Computer Processing STARTER: GO FOR 5.... Try to list 5 factors which affect how a computer performs. Ext: For each explain what affect it has and why. 1.Size of processor 2.Amount of Cache Memory 3.Number of cores 4.Amount of RAM 5.Transfer speed of data buses. BONUS: Amount of free Hard Disk space...If a computer is using all or it’s RAM it will use a section of hard disk as a supplement. This is called VIRTUAL MEMORY. However this is still slower than pure RAM. GCSE Computing#BristolMet Primary Storage This is also known as Main Memory or Primary Storage. INVESTIGATION (7 mins): Research what is known as the ‘bootstrap’ program of a computer. Take notes and prepare to explain where and how is stored in the computer and why it is so important. This is the first instructions the CPU receives when a computer is turned on and is commonly called the BIOS (Basic Input Output System). It contains code which controls the basic hardware settings of a PC. It is mainly stored in ROM (Read Only Memory) which is NOT erased when power is turned off. GCSE Computing#BristolMet MEMEMORY – Remember?? To recap... There are 2 main categories of memory: RAM – Random Access Memory This is volatile memory as it’s erasable (without power) but can be accessed quickly by the CPU. ROM – Read Only Memory This is non volatile as the data Is retained without power. Therefore Knows how to start up (or boot) after Being turned off. GCSE Computing#BristolMet 4 Min Investigation What type of memory is cache memory? Are there any sub-divisions of memory? Create a table and note their characteristics. HomeWork – Investigate SRAM and DRAM. What are their characteristics, differences and uses in terms of computer processing. GCSE Computing#BristolMet The Fetch-Execute Cycle The CPU receives data and instructions in binary form. An instruction will have 2 parts – an instruction and possibly some data, a number or a memory location. The programs that the CPU needs to process are stored in main memory. The CPU simply fetches the next instruction it needs to process, decodes it and executes it before repeating the process. Fetch Excecute Decode The speed of this cycle is determined by an electronic Real Time Clock (RTC) chip. The computer synchronises all processes to this clock signal. The clock speed is measured in Hertz (Hz) or cycles per second. TASK: 500 Hz would be 500 cycles per second, how many could a 3GHz processor be capable of? GCSE Computing#BristolMet Machine Code with The Little Man Computer Visit the following site and follow the simulations of the Fetch-Execute cycle using the Little Man Computer (LMC) http://www.cs.ru.nl/~erikpoll/III/dag4.html This is an interpretation of how a processor handles machine code. TASK: Follow the instructions and make a note/diagram of where the Little Man goes to throughout the Fetch Execute Cycle. REMEMBER: Instructions are split into 2 parts, the instruction (+,-, x, store etc) and the data itself (or memory location/address of where the data to be used is stored) 1) The Op Code (or Operation Code Field) is part of the binary code giving the instruction to be carried out i.e add or jump 2) The Operand (Operand Field or address field) gives the address (memory location) where the data to be used in the operation is stored. GCSE Computing#BristolMet Little Man Code Library CODE MEANING 1ab Load 2ab Store 3ab Add 4ab Subtract 500 Input 600 Output 700 Stop 800 Skip If Negative 801 Skip If Zero 802 If Skip Positive 9AB Jump Beware: the Little Man 0 is a positive number, so the instruction 802 is actually Skip if Non-negative. GCSE Computing#BristolMet Little Man Which parts of the processor does each LCM item belong to? GCSE Computing#BristolMet System Block Diagram GCSE Computing#BristolMet Little Man Machine Code Tasks Assignments 1. Create a simple that will add any 2 numbers and display the results. 2. Create a simple programs that will calculate the perimeter of any rectangle. 3. Create a program using the LMC to allow the input of 2 integer values and then order them to output the largest value first and then the smallest RGB conversion SW 4. Colors of a pixel on a color are often represented with three values (r, g, b) that the red, green and blue value display. Grayscale on a monochrome display are represented by only one gray value. Choose a program that adds three inputs and divide by three, and so rgb values to the grayscale. GCSE Computing#BristolMet Flow Chart to LMC Assignment 1 START Input A Store A GCSE Computing#BristolMet Input B END Store B Output Result Load A Add B Coded Solution to Assignment GCSE Computing#BristolMet 00 01 02 03 04 05 06 500 299 500 298 199 398 600 INPUT A STORE Value A at memory location (address 99) INPUT B STORE Value B at address 98 LOAD A ADD B OUTPUT Result Flow Chart Flow chart of solution to LMC Assignment 3 GCSE Computing#BristolMet