Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

33
Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture

Transcript of Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Page 1: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 1

COMPUTING(Higher)

Unit 1

Computer Systems Topic 2 – Computer Stucture

Page 2: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 2

CATEGORIES OFCOMPUTERS

Systems Booklet - Pages 10-12 Computers are normally classified into these categories:

• Mainframe - A high-level computer designed for the most intensive computational tasks.

• Desktop Computer - Sometimes known as a personal computer, this is a compact system that can fit on your desk at home, work, or school.

• Laptop Computer — A computer system designed to be portable, but can still as powerful as desktop systems.

Page 3: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 3

• Palmtop Computer — A pocket sized computer, tend to run applications that are useful to individuals, eg diary, address book, calculator, etc.

• Embedded Computer — Hardware and software to do a specific function, e.g. in a washing machine. Always part of a larger system, and works in real-time

• Networked Computer - A computer (usually a micro) that has access to a network. Networked computers have their own processor and memory and have access to a file server for programs and data. There are 2 main types of network:

•Local Area Networks (LAN) and •Wide Area Networks (WAN).

Desktop, Laptop, Palmtop and Networked Computers can be classified as types of microcomputers.

Page 4: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 4

Processing Power

The clock speed of the processor is the main indicator of the power of the processor.

It is measured in MHz (Megahertz) or GHz (Gigahertz).

1 Megahertz is one million clock pulses per second.

1 Gigahertz is one thousand million clock pulses per second

Page 5: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 5

Computer Organisation Systems Booklet - Pages 14-18

Figure 1: Computer Block Diagram 1

INPUT

PROCESSOROUTPUT

MEMORY

BACKING STORE

Page 6: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 6

Table 1: Common Devices

INPUT BACKING STORAGE OUTPUT

Keyboard Hard Disc Monitor

Mouse Floppy Disc Printer

Joystick Tape Speakers

Scanner CD - ROM Plotter

Light Pen Optical Disc Motor (Robot)

Page 7: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 7

Figure 2: Computer Block Diagram 2

INPUT

PROCESSOR

OUTPUT

BACKING STORE

MEMORY

ROM RAM

Page 8: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 8

Computer Memory

Two types of internal (immediate access) memory exist:

RAM ROM.

Page 9: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 9

RAM – Random Access Memory

Random Access Memory is the working area of the computer and is used to store programs and data currently being used.

• Has same access time for all locations.• Volatile – loses contents on power off.

There are2 types of RAM (Static and Dynamic)• Static – holds contents as long as there is

power.

Each memory location has a unique address.

• Dynamic – has to be refreshed (every 2 ms).

Page 10: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 10

ROM – Read Only Memory

ROM is a permanent area of storage for data and programs. These chips are 'hard-wired' and cannot be altered by software.

• Contents are permanent or non-volatile.

• Software & data fixed into ROM at manufacture.

• Operating systems and specialised ROMs (e.g. cameras and CD players etc.)

Page 11: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 11

Programmable Read Only Memory (PROM)Sometimes special ROM’s are provided for the user to program. This process requires a special hardware device and is called 'blowing' since each bit is a fusible link that becomes zero when destroyed. Such devices are called PROM’s and the process is irreversible.

Erasable Programmable Read Only Memory (EPROM’S) These also exist, where the user can use Ultra Violet light to erase a ROM for reprogramming.

Page 12: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 12

External Memory

External memory, such as the hard disk, holds quantities of data too large to store in main memory.

It is also used to keep a permanent copy of programs and data.

Examples of external memory devices are:

• hard disk;

• floppy disk;

• zip disk;

• CD-R;

• magnetic tape;

• flash drive.

Page 13: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 13

Buses What is a Bus?

A bus is a group of parallel wires, along which data can pass in the form of electrical signals. The width of the bus determines the amount of data it can handle at any given time.

What does a Bus do? Buses are used to connect computer components together. Buses can be internal, e.g. between the CPU and registers, and external, e.g. between the computer and other peripherals (printers, etc.). Buses can be dedicated to one task, or may carry data for many different tasks. Buses may also be BI-DIRECTIONAL or UNIDIRECTIONAL.

Page 14: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 14

PROCESSOR

MEMORY

PROCESSOR

MEMORY

is really like ad

dre

ss

bu

s

dat

a b

us

con

trol

bu

s

Page 15: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 15

DIFFERENT TYPES OF BUSES. The main buses we will look at are the –

• Data Bus• Address Bus• Control Bus

The DATA BUS This is a bi-directional bus that carries data between the processor and memory. All the data is in binary. The width of it will match the size of a memory location

Page 16: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 16

The ADDRESS BUSThis is a unidirectional bus which carries the addresses of the locations where data and instructions can either be found or stored. Each memory location has a unique identifier (address) so that the processor can locate it.

Therefore, the width of the Address bus relates directly to the number of possible memory locations within memory (RAM and ROM).

Page 17: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 17

Therefore…

Maximum Addressable Memory =

2 Width of the address bus x Width of the data bus

Page 18: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 18

For Example

If a system has a 16-line address bus and a 32-bit data bus then…

…the possible memory locations (addresses) in that computer are 216 (65536).

Note this is just the number of locations, the amount of memory needs the data bus width as well!!

Why 216? Computers work in base 2, so each line can be either 1 or 0 at any given time. This allows for 216 possible combinations of 1 and 0.

We then multiply the total number of addresses by the width of the data bus…

216 x 32 = 2097152 bits

/8 /1024 = 256KB

Page 19: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 19

The CONTROL BUS

This is a bus in name only. It is, in fact a collection of lines that are unrelated, and each one carries out a different task. The common lines in the control bus are the –

•Read Line - Initiates a memory read operation (after the address bus is set up)

•Write Line - Initiates a memory write operation (after the address bus, and data bus is set up)

•Reset Line - Clears all registers and starts the execution of instructions from a predefined location (similar to switch the computer off and on)

Page 20: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 20

•Interrupt Line - cause the processor to stop what is doing, save its current state, and then service the interrupt. Once completed, it will return the computer to its previous state.

E.g. Paper Jam in printer, inform user). The processor can be set to ignore these.

•Non-Maskable Interrupt Line - As above, but cannot be ignored by the processor. E.g. Power failure imminent.

•Clock - Send a regular sequence of pulses, which are used to synchronise the processor. These are counted in MHz (million cycles per second.) Many processor events are timed to take 1 clock cycle, but more complex instructions may take 2 or 4 clock cycles to perform.

Page 21: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 21

STRUCTURE OF THE CPU Systems Booklet - Page 17

A more detailed look at the Processor (CPU) shows three main components:

• Arithmetic and Logic Unit,

• Control Unit,

• Registers.

These are connected to the rest of the computer via the buses discussed earlier.

Page 22: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 22

The Arithmetic & Logic Unit (ALU)  

This is a key part of the processor • It is where data is processed and manipulated. • It performs arithmetic functions such as add and

subtract, and logical operations such as AND, OR and NOT.

 

The Control Unit

The function of a processor is to fetch instructions from memory and carry them out. The Control Unit performs this function by fetching, interpreting, and executing each instruction in turn. It sends out control signals controlling the operation of all hardware, including I/O devices, and the CPU.

Page 23: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 23

Computer Memory

The Registers  

The processor requires fast access to temporary storage locations for use when setting up buses and fetching instructions; therefore special areas called registers exist within the processor itself. The types and number of registers vary greatly from processor to processor but there are certain features common to all of them. (see page 17)

Two registers that we will look at are:Memory Address Register (MAR)Memory Data Register (MDR)

Page 24: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 24

MEMORY - READING AND WRITINGThe basic operations involving the Address and Data buses are –

• Read from Memory• Write to Memory

READ From Memory -Instructions are fetched, or data is read

• Processor (CPU) sets up the Address lines with the required address (location)

• Processor (CPU) activates read line on Control bus.

• Memory releases data (instructions) onto the Data bus.

Page 25: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 25

• Processor (CPU) sets up Address lines with the required address (location)

• Processor (CPU) sets up the Data lines with the data to be written.

• Processor (CPU) activates write line on Control bus.• Data is written from the Data bus to the Memory

location.

WRITE to Memory –

Data is written to memory

Page 26: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 26

Stored Program Concept

To run a program, the computer must first load the program from backing storage into RAM, where it is stored until required by the processor.

This is called the Stored Program Concept. 

The program loaded may contain hundreds of thousands, or even millions of instructions, but the processor can only execute one at a time. Therefore, it :

Page 27: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 27

• Fetches the instructions one at a time from memory (RAM),

• Places them into the processor,

• Decodes them, and

• Executes them.

This cycle is repeated for every instruction.

This process is called the

FETCH – EXECUTE CYCLE.

Page 28: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 28

The FETCH EXECUTE CYCLE

Page 29: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 29

Measures of Processor Speed

When we measure performance we usually mean how fast the computer carries out instructions. There are many different ways of measuring performance, the main ones are:

Clock Speed• Generally the faster the clock speed the faster the processor – 3.2

GHz is faster than 933 MHz. (more details later.)Mips – Millions of Instructions per Second

• Better comparison but beware of false claims e.g. only using the simplest & fastest instructions and different processor families.

Flops – Floating Point Operations per sec.• Best measure as FP operations are in every processor and provide

best basis.Benchmark Tests

• Well defined standardised routine to test the performance of a computer.

• Dhrystone – tests string and frequently used functions• Whetstone – test using arithmetic functions

Page 30: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 30

Memory and System Performance 

A common way of increasing system performance is to increase the amount of memory in the computer, but

• Word size, • Speed of access, and • Cache memory

Can also all affect system performance.

Page 31: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 31

Cache Memory

This is a section of memory between the processor and the main memory, or the processor and disks, with a very fast access time. This means it takes less time to fetch information stored here.

Page 32: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 32

Clock Speed

Every processor has a clock which ticks continuously at a regular rate.

This Synchronises all the components.

Cycle time measured in MHz or GHz

200 MHz (megahertz) means the clock ticks 200,000,000 times a second (P1 -1995)

1.4 GHz (gigahertz) is 1,400,000,000 times a second (P4 – 2001)

2.3 – 4+ GHz (Dual/ Multi Core)

Page 33: Slide 1 COMPUTING (Higher) Unit 1 Computer Systems Topic 2 – Computer Stucture.

Slide 33

Bus Widths and System Performance

The width of the data bus defines how much data can be accessed in one FETCH. (i.e. speed of access) A computer with a 32-bit data bus will be distinctly faster than one with a 16-bit data bus

BUT (because factors other than the width of the bus have to be taken into consideration) it will not be twice as fast.

Most modern processors are 64 bit but some are now 128 bit.