Hardware Processor components ROM 24122021 1 Learning Objectives

Hardware Processor components & ROM 24/12/2021 1

Learning Objectives Describe the function and purpose of the control unit, memory unit and ALU. 24/12/2021 2

Structure Diagram Internal Memory / Memory Unit / Primary Memory Central / Essential Computer INPUT DEVICES e. g. mouse, keyboard, …. . Storage 24/12/2021 RAM PROCESSOR (CU & ALU & Processor’s Memory) ROM OUTPUT DEVICES e. g. monitor, printer, … AUXILIARY (SECONDARY) STORAGE e. g. Hard disk, memory stick, … 3

Control Unit Manages instructions and makes sure that the ALU does what it should be doing. It has to: 1. Manage the execution of instructions: Decide which instruction to carry out next, then go and get it. 2. Decipher / decode the instruction: It has to work out what needs to be done to carry out the next instruction. 3. Sends control and timing signals to other parts of processor. 24/12/2021 4

Transfer of Data Primary Memory 24/12/2021 ALU Storage 5

Arithmetic Logic Unit (ALU) Part of processor where data is processed/manipulated: n Contains circuitry that allows it to carry out arithmetic operations. Series of logic gates such as AND, OR, NOT, etc… n The operation code of each instruction is decoded by the control unit which then tells the ALU which set of gates to use. Bit shifting operations can be efficient ways of performing multiplication or division. n n n http: //en. wikipedia. org/wiki/Arithmetic_shift It allows for logical comparisons to be made (e. g. Is this value negative? or Is this number larger than this number? …. ). All input and output to and from the processor and memory must pass through the ALU and wait there until the control unit decides what to do with it. Acts a buffer. Note: The ALU does not make any decisions, it simply reports the result of any calculations or comparisons to the control unit (any decisions are the control unit’s responsibility). 6

RAM The primary memory of the computer is the memory that is advertised as being “ 128 Mbytes of RAM”. n This simply describes the capacity of the memory RAM n n Random Access Memory Random Access = the ability to find (jump to) a file, program or specific data immediately without having to go through other files or data first (sequential access). Think of the difference between finding and playing a song/track/movie on an old cassette or video tape versus a CD, DVD or mp 3 player. 24/12/2021 7

Memory Unit / Primary / Main Memory http: //en. wikipedia. org/wiki/Main_memory#Primary_storage There are two other parts of the memory unit/primary/main memory besides the main largecapacity RAM: Processor registers and processor cache memory which are both located inside the processor. So conceptually the term main memory includes "stuff" in the processor and this is why “main memory” can be considered to located in the processor (or at least part of it is – the cache or processor’s memory & registers). 24/12/2021 8

Memory Unit / Primary / Main Memory Sometimes called the memory unit as it consists of the RAM and the registers & processor cache memory in the processor (processor’s memory). n Therefore, technically the memory unit is considered to be in the processor (as at least part of it is). Also called the Primary / Main Memory as it so important to the processor. Stores data and parts of the application software and operating system currently in use by the control unit. n n If they are being held in locations other than in main memory (e. g. hard disk) they cannot be used by the processor until it is moved into the processor’s memory. As it is so important it is called Main / Primary memory. However it is Volatile: n When the computer is switched off all data is lost. 24/12/2021 9

ROM (Read Only Memory) ROM is internal memory that cannot be altered. It is non-volatile: n This means that even switching the computer off will not affect the contents of the ROM. It contains the Bootstrap program which is part of the BIOS (see next slides). This Bootstrap program is small so very little needs to be stored in ROM so it tends to be very small. 24/12/2021 10

Bootstrap / Booting So the operating system is stored on the hard drive of a computer along with all the other programs that may be used. A problem arises because when the computer is switched on it needs the operating system to be able to do anything useful, so a small program is stored on ROM whose job it is to go and get the operating system from the hard drive and move it into the Main/Primary Memory/Memory unit (RAM and the registers & processor cache memory in the processor - processor’s memory) so that the computer can work. This little program is called the bootstrap, and the process of retrieving the operating system is known as booting. 24/12/2021 11

Basic Input Output System (BIOS) Includes the bootstrap program n This part is held in the ROM as it is unchangeable and needs to be there when the computer is switched on. See previous slide. The rest of the BIOS is held on secondary storage e. g. the hard drive as it is changeable. 24/12/2021 12

ROM n Note that in the past the whole operating system was stored on ROM, but that means that if you want to use your computer in a different way or you want to install the latest edition of an operating system to replace the one in use, you can’t because the computer can’t delete the old one. When the computer is turned on it would be there.

RAM & ROM - Similarities Both have random access (even though ROM stands for Read Only Memory it still has random access). n Otherwise access data, programs and files would be too slow. 24/12/2021 14

Difference between main memory and auxiliary (secondary) storage Main memory: n Transitory. Secondary storage: n (Semi-) Permanent. 24/12/2021 15

Why use auxiliary (secondary) storage? To store the operating system, application software and files: n When the power to the processor is switched off (as RAM would n To allow them to be alterable and upgradeable (as ROM is Read lose them). Only Memory). To store files which are too large to be stored in the processor itself, until they are needed (as RAM and ROM have much smaller storage capacities). To allow for the transfer of data from one machine to another (as RAM, ROM and the internal hard disk are installed internally). A full operating system requires a large amount of storage space that is better utilised in the computer memory for applications. 24/12/2021 16

Plenary Describe the purpose of the control unit memory unit arithmetic logic unit n n n in a computer. 24/12/2021 17

Plenary Control Unit n n n To manage the execution of instructions By running a clock To decode instructions Memory Unit n n n To store OS To store those parts of applications programs currently running To store data currently in use Arithmetic Logic Unit n n Carries out arithmetic operations and makes logical comparisons. All I/O must pass through here. 24/12/2021 18
- Slides: 18