+ All Categories
Home > Documents > Components of a Computer Prepared by: Mrs. McCallum-Rodney.

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

Date post: 01-Jan-2016
Category:
Upload: prosper-gibson
View: 214 times
Download: 0 times
Share this document with a friend
Popular Tags:
27
Components of Components of a Computer a Computer Prepared by: Mrs. McCallum-Rodney
Transcript
Page 1: Components of a Computer Prepared by: Mrs. McCallum-Rodney.

Components of Components of a Computera Computer

Prepared by: Mrs. McCallum-Rodney

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

What is a computer ?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 ).

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

What is a Computer What is a Computer System?System?

A computer system consists of the A computer system consists of the computer itself and its peripheral computer itself and its peripheral equipmentequipment (devices that works with a (devices that works with a computer).computer).

A computer system is liken unto a A computer system is liken unto a human being, where the brain is the human being, where the brain is the computer, but without hands, feet, computer, but without hands, feet, mouth along with other parts of the mouth along with other parts of the body we will not be able to output body we will not be able to output what we understand from what was what we understand from what was heard (ears), seen (eyes) and felt heard (ears), seen (eyes) and felt (skin).(skin).

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

Diagram of the Computer Diagram of the Computer SystemSystem

INPUT* keyboard* mouse* scanner* disk

Computer

•Arithmetic and Logic Unit (ALU)

OUTPUT* monitor* printer* disk

Secondary Memory / Storage

Main Memory

•Control Unit (CU)

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

Components of a Computer

Main Memory

Central Processing Unit (CPU)

Arithmetic and Logic Unit

Control Unit

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

Main MemoryMain MemoryMain 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 ).

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

Main Memory (cont.)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)

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

Random Access MemoryRandom 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.

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

Read-Only MemoryRead-Only Memory

ROM’s contain information that are ROM’s contain information that are read-onlyread-only i.e. i.e. their contents can only their contents can only be readbe read..

The contents of ROM’s are The contents of ROM’s are non-non-volatilevolatile i.e. they are not lost after the i.e. they are not lost after the machine is switched off. machine is switched off.

ROM’s tend to store programs that are ROM’s tend to store programs that are required to boot-up your computer. required to boot-up your computer. These programs These programs load the operating load the operating systemsystem as well as execute a set of test as well as execute a set of test routines called the routines called the POSTPOST ( ( Power On Power On Self TestSelf Test ). ).

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

Read Only Memory (Cont.)Read Only Memory (Cont.) EPROM - Erasable Programmable EPROM - Erasable Programmable

Read Only Memory Read Only Memory This is a type of memory chip that can be This is a type of memory chip that can be erased by removing it from the circuit erased by removing it from the circuit and exposing it to ultraviolet light (sun and exposing it to ultraviolet light (sun light). The chip can then be light). The chip can then be programmed.programmed.

PROM – Programmable Read Only PROM – Programmable Read Only MemoryMemoryThis is a type of memory chip that can be This is a type of memory chip that can be programmed, but once programmed it programmed, but once programmed it cannot be erased.cannot be erased.

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

Secondary MemorySecondary 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.

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

Secondary MemorySecondary Memory

Examples of secondary storage devices include:

Hard disks Zip drives Floppy disks Read-Writable CD-ROMS

(To be looked at later)

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

Device DriversDevice DriversAs 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.

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

Memory LatencyMemory 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.

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

Memory Latency (Cont.)Memory Latency (Cont.)

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

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

Hardware ( Memory )Hardware ( Memory )

CPU

Main Memory

Device Driver

Secondary

Storage Device

Simplified Memory Access Diagram

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

Central Processing UnitCentral Processing UnitThe 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.

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

Central Processing UnitCentral Processing UnitThe 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 The control unit’s task is to coordinate the timing and coordinate the timing and organisation of machine instructionsorganisation of machine instructions. . The control unit has access to specific The control unit has access to specific areas of high speed memory ( called areas of high speed memory ( called registersregisters ) for this task. Some ) for this task. Some registers used by C.U.’s are registers used by C.U.’s are

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

RegistersRegisters

The Current Instruction Register ( The Current Instruction Register ( CIR )CIR )

The Program Counter ( PC )The Program Counter ( PC ) The Memory Data register ( MDR )The Memory Data register ( MDR ) The Memory Address Register The Memory Address Register

( MAR )( MAR )

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

RegistersRegistersThe 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.

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

RegistersRegisters

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.

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

BusesBusesGenerally, registers are loaded with data Generally, registers are loaded with data

directly from main memory. To speed up directly from main memory. To speed up the latency between memory and the the latency between memory and the CPU, CPU, dedicated communication dedicated communication channelschannels are provided called are provided called busesbuses..

Different types of buses are:Different types of buses are:

1.1. An Address BusAn Address Bus– Which communicates addresses Which communicates addresses

between memory, the PC and MAR.between memory, the PC and MAR.2.2. A Data BusA Data Bus

– Which communicates data values Which communicates data values between memory and the CIR and between memory and the CIR and MDR.MDR.

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

BusesBuses

3.3. A Control BusA Control Bus– A bus which carries read/write A bus which carries read/write

signals to memorysignals to memory

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

Hardware ( CPU )Hardware ( CPU )

Main Memory

Control Unit

Control Bus

(read/write signal)

MDR

MAR

Data busAddress Bus

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

Arithmetic and Logic Arithmetic and Logic UnitUnit

This is the section of the CPU that This is the section of the CPU that performs arithmetic and logical operation performs arithmetic and logical operation on data. In other words, on data. In other words, it is the part of it is the part of the computer that computes.the computer that computes.

Arithmetic Arithmetic operations include addition, operations include addition, subtraction, multiplication, and division.subtraction, multiplication, and division.

LogicalLogical operations compare pairs of data operations compare pairs of data items to determine whether they are items to determine whether they are equal and if not larger.equal and if not larger.

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

Machine CycleMachine Cycle

The processing of a single machine-The processing of a single machine-level instruction is accomplished in a level instruction is accomplished in a four step machine cycle.four step machine cycle.

As the CPU processes a single As the CPU processes a single machine-level instruction, it machine-level instruction, it completes a completes a machine cyclemachine cycle ..

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

Machine CycleMachine Cycle

Control Unit ALU

MEMORY

CPU

2. DECODE The instruction is decoded into a form the ALU can process.

3. EXECUTEThe ALU executes the instruction.

1. FETCHThe next instruction is fetch from memory

4. STOREResults from the instruction execution are stored in memory


Recommended