Presentation is loading. Please wait.

Presentation is loading. Please wait.

Components of a Computer Prepared by: Mrs. McCallum-Rodney.

Similar presentations


Presentation on theme: "Components of a Computer Prepared by: Mrs. McCallum-Rodney."— Presentation transcript:

1 Components of a Computer Prepared by: Mrs. McCallum-Rodney

2 What is a computer ? A computer is an implementation of a machine that mechanically interprets and executes a sequence of instructions, and communicates with peripheral devices (devices that work with a computer for example keyboard). The Von-Neumann model defines a machine that executes one instruction at a time. The instructions are stored locally in memory and executed by the CPU ( Central Processing Unit ).

3 What is a Computer System? A computer system consists of the computer itself and its peripheral equipment (devices that works with a computer). A computer system consists of the computer itself and its peripheral equipment (devices that works with a computer). A computer system is liken unto a human being, where the brain is the computer, but without hands, feet, mouth along with other parts of the body we will not be able to output what we understand from what was heard (ears), seen (eyes) and felt (skin). A computer system is liken unto a human being, where the brain is the computer, but without hands, feet, mouth along with other parts of the body we will not be able to output what we understand from what was heard (ears), seen (eyes) and felt (skin).

4 Diagram of the Computer System INPUT * keyboard * mouse * scanner * disk Computer Arithmetic and Logic Unit (ALU) OUTPUT * monitor * printer * disk Secondary Memory / Storage Main Memory Control Unit (CU)

5 Components of a Computer Main Memory Central Processing Unit (CPU) Arithmetic and Logic Unit Control Unit

6 Main Memory Main Memory is also known as: Memory Primary Memory or Primary Storage The reason that it is referred to as main memory is because it is the main location where the CPU looks for data and instructions during execution of a program. Memory can be thought of as a series of cells which can contain data or instructions. Each cell has a distinct address. Typically a cell can store 8 bits (a byte) of information ( more on this later ).

7 Main Memory (cont.) In most computers there are a variety of memory technologies that are used to store specific types of information. The two main types are Random Access Memory (RAM) Read-only Memory (ROM)

8 Random Access Memory Information can be both read from or written to RAM. This type of memory stores the instructions and data of a currently executing program. The problem with RAM is that it is volatile i.e. its contents are erased as soon as the computer is switched off. Additionally RAM is a finite resource (also expensive) and therefore limited. The amount of RAM usually determines the size of the programs that can be executed and the size of the data they work on.

9 Read-Only Memory ROM’s contain information that are read-only i.e. their contents can only be read. ROM’s contain information that are read-only i.e. their contents can only be read. The contents of ROM’s are non-volatile i.e. they are not lost after the machine is switched off. The contents of ROM’s are non-volatile i.e. they are not lost after the machine is switched off. ROM’s tend to store programs that are required to boot-up your computer. These programs load the operating system as well as execute a set of test routines called the POST ( Power On Self Test ). ROM’s tend to store programs that are required to boot-up your computer. These programs load the operating system as well as execute a set of test routines called the POST ( Power On Self Test ).

10 Read Only Memory (Cont.) EPROM - Erasable Programmable Read Only Memory EPROM - Erasable Programmable Read Only Memory This is a type of memory chip that can be erased by removing it from the circuit and exposing it to ultraviolet light (sun light). The chip can then be programmed. PROM – Programmable Read Only Memory PROM – Programmable Read Only Memory This is a type of memory chip that can be programmed, but once programmed it cannot be erased.

11 Secondary Memory The limitations of main memory are reduced with the inclusion of secondary memory or secondary storage. Secondary storage is non-volatile i.e. its contents are permanent until overwritten. potentially limitless in the sense that we can expand secondary memory at usually a cheaper cost than expanding main memory.

12 Secondary Memory Examples of secondary storage devices include: Hard disks Zip drives Floppy disks Read-Writable CD-ROMS (To be looked at later)

13 Device Drivers As different secondary storage devices record data in different ways, the CPU is not able to access the data directly unlike main memory (where it knows its internal layout). To allow CPU’s to access data on these secondary devices, a device driver is provided. A device driver is a small utility program that controls how data is written to or read from the device. A request by the CPU to read or write from the device is handled by the device driver which acts as an interface between the two.

14 Memory Latency The time taken for the CPU to access a data item on secondary storage is usually far slower than accessing main memory directly. Can you give reasons why ? Extra communications in dealing with the device driver Slow communication cabling between device and CPU.

15 Memory Latency (Cont.) Due to the slower access time ( latency ) to secondary storage it is beneficial to write programs that access main memory directly.

16 Hardware ( Memory ) CPU Main Memory Device Driver Secondary Storage Device Simplified Memory Access Diagram

17 Central Processing Unit The component that effectively manages the execution of instructions is the central processing unit ( CPU ). The CPU is in charge of reading instructions from memory and also reading and writing data to memory (scheduling). The CPU must organise the order of execution and ensure that all the data is available before an instruction is executed.

18 Central Processing Unit The CPU consists of two main functional units: The Control Unit ( CU ) The Arithmetic and Logic Unit ( ALU ) The Control Unit The control unit’s task is to coordinate the timing and organisation of machine instructions. The control unit has access to specific areas of high speed memory ( called registers ) for this task. Some registers used by C.U.’s are

19 Registers The Current Instruction Register ( CIR ) The Current Instruction Register ( CIR ) The Program Counter ( PC ) The Program Counter ( PC ) The Memory Data register ( MDR ) The Memory Data register ( MDR ) The Memory Address Register ( MAR ) The Memory Address Register ( MAR )

20 Registers The Program Counter The PC holds the address in memory of the next instruction to be executed. The Current Instruction Register The CIR holds the current instruction being executed. The Memory Address Register When an instruction in the CIR requires access to data in memory the MAR is loaded with the address in memory where the data resides.

21 Registers The Memory Data Register When the MAR is loaded with an address the actual memory data item is retrieved from memory and placed in the MDR. There are also a variety of general purpose registers than can be used as high-speed temporary storage locations.

22 Buses Generally, registers are loaded with data directly from main memory. To speed up the latency between memory and the CPU, dedicated communication channels are provided called buses. Different types of buses are: 1. An Address Bus – Which communicates addresses between memory, the PC and MAR. 2. A Data Bus – Which communicates data values between memory and the CIR and MDR.

23 Buses 3. A Control Bus – A bus which carries read/write signals to memory

24 Hardware ( CPU ) Main Memory Control Unit Control Bus (read/write signal) MDR MAR Data busAddress Bus

25 Arithmetic and Logic Unit This is the section of the CPU that performs arithmetic and logical operation on data. In other words, it is the part of the computer that computes. This is the section of the CPU that performs arithmetic and logical operation on data. In other words, it is the part of the computer that computes. Arithmetic operations include addition, subtraction, multiplication, and division. Arithmetic operations include addition, subtraction, multiplication, and division. Logical operations compare pairs of data items to determine whether they are equal and if not larger. Logical operations compare pairs of data items to determine whether they are equal and if not larger.

26 Machine Cycle The processing of a single machine-level instruction is accomplished in a four step machine cycle. The processing of a single machine-level instruction is accomplished in a four step machine cycle. As the CPU processes a single machine-level instruction, it completes a machine cycle. As the CPU processes a single machine-level instruction, it completes a machine cycle.

27 Machine Cycle Control UnitALU MEMORY CPU 2. DECODE The instruction is decoded into a form the ALU can process. 3.EXECUTE The ALU executes the instruction. 1.FETCH The next instruction is fetch from memory 4.STORE Results from the instruction execution are stored in memory


Download ppt "Components of a Computer Prepared by: Mrs. McCallum-Rodney."

Similar presentations


Ads by Google