Intermediate 2 Computing Computer structure. Organisation of a simple computer.

21
Intermediate 2 Computing Computer structure

Transcript of Intermediate 2 Computing Computer structure. Organisation of a simple computer.

Page 1: Intermediate 2 Computing Computer structure. Organisation of a simple computer.

Intermediate 2 Computing

Computer structure

Page 2: Intermediate 2 Computing Computer structure. Organisation of a simple computer.

Organisation of a simple computer

Page 3: Intermediate 2 Computing Computer structure. Organisation of a simple computer.

The purpose of the ALU

• The Arithmetic and Logic Unit (ALU) is the part of the Central Processing Unit (CPU) where the following take place:– Calculations– Boolean logic (AND, OR, NOT)– Comparisons (<,=, >, <=, >=)

Page 4: Intermediate 2 Computing Computer structure. Organisation of a simple computer.

The purpose of the Control Unit

• The Control Unit sends out control signals:– Within the processor to move data from one

register to another and to activate specific ALU functions;

– To the control bus to read or write from memory;

– To Input/Output modules.

Page 5: Intermediate 2 Computing Computer structure. Organisation of a simple computer.

The purpose of the registers

• Registers are storage locations that are internal to the processor.

• They are used to:– Hold data that is being transferred to or from

memory;– Hold the address of the location in memory

which the processor is accessing to read or write data;

– Hold the instructions that are being carried out.

Page 6: Intermediate 2 Computing Computer structure. Organisation of a simple computer.

The function of the data bus

• The lines on the data bus enable data to be transferred between the processor and the main memory.

Page 7: Intermediate 2 Computing Computer structure. Organisation of a simple computer.

The function of the address bus

• This holds the address of the memory location being accessed.

Page 8: Intermediate 2 Computing Computer structure. Organisation of a simple computer.

The control lines

• The control bus is made up of several lines.– The read line instructs the system to place

data from the specified memory address on the data bus.

– The write line instructs the system to take the data from the data bus and place it in the location specified by the address bus.

– The Clock line provides the timing function of the system. The pulses from the clock line control when each step of the function takes place. Theses pulses control and regulate the activities of the processor.

Page 9: Intermediate 2 Computing Computer structure. Organisation of a simple computer.

The control lines (Cont.)

• Other lines on the control bus include.– The reset line. A signal on this line stops all

processes, clears all registers and places the system back in its original state.

– The interrupt line. A signal here pauses the current process and allows another process to take control of the processor.

Page 10: Intermediate 2 Computing Computer structure. Organisation of a simple computer.

Data bus

Address bus

Control bus

Fetch execute cycle

1. Set up the address bus by moving the address to the Memory Address Register.

2. Signal the read line on the control bus.3. Transfer the data from memory to the Memory Data Register.

Address bus

Data bus

Read line

4. Decode and execute the instruction.5. Reset all signals.

Data bus

Address bus

Control bus

RegistersA more detailed animation can be found here.

Page 11: Intermediate 2 Computing Computer structure. Organisation of a simple computer.

Registers

• Registers are storage locations that are internal to the processor.

• They are used to:– Hold data that is being transferred to and from

memory.– Hold the address of the memory location that

the processor is reading/writing to/from.– Hold the instructions that are being carried

out.

Page 12: Intermediate 2 Computing Computer structure. Organisation of a simple computer.

Main Memory

• This is the main internal storage area for the computers instructions.

• It is divided into ROM and RAM sections.

• Reading from main memory is slower than reading from registers.

Page 13: Intermediate 2 Computing Computer structure. Organisation of a simple computer.

Backing Storage

• This is the slowest form of data used to store data or software.

• It retains its data when the power is switched off, unlike the RAM in the main memory.

Page 14: Intermediate 2 Computing Computer structure. Organisation of a simple computer.

Comparing different types of memory.

Memory Function Speed of access

Registers Internal to the processor. Holds data while being processed, e.g. Instruction Register

Fast access time internal to the processor.

Main Memory

Stores user data and software in RAM and some system software in ROM.

Accessing data in main memory is slower than accessing either cache memory or registers.

Backing Storage

Stores data, software. Retains the data when power is off.

Slowest of all the types of memory.

Page 15: Intermediate 2 Computing Computer structure. Organisation of a simple computer.

Addressability

• In your street all the houses are given different numbers so the postman knows where to deliver his mail.

No.2 No.4 No.6 No.8 No.10

Page 16: Intermediate 2 Computing Computer structure. Organisation of a simple computer.

Addressability• Computers also give each location in memory a

different number so it knows where to place each piece of data, this number is known as a Memory Address. The computer can use this Memory Address to find the correct location when accessing it’s memory.

Memory Locations

11001111

11001110

11001101

11001011

11001010

11001001

11001000

11001100Memory Addresses

Data1011…….

Page 17: Intermediate 2 Computing Computer structure. Organisation of a simple computer.

Addressability

• The number of locations that a processor can address is, in theory, limited by the number of lines on the address bus.

• If the address bus is 16 bit wide there can, in theory, be:– 216 = 65536 different memory locations.

• If each memory location stores 32 bits of memory then the total memory capacity is:=65536 x 32bits = 65536 x 4bytes=262144bytes = 256KB

Page 18: Intermediate 2 Computing Computer structure. Organisation of a simple computer.

Measuring performance

• There are several different way to measure the performance of a processor. You need to know about:– Clock speed.– Application-based tests.

Page 19: Intermediate 2 Computing Computer structure. Organisation of a simple computer.

Clock speed

• One way to compare computers is to compare the clock speed.– The clock pulses regulate the activities in the

processor.– The pulses are measured in Megahertz (MHz)

and Gigahertz (GHz)– 1 MHz = 1 million pulses a second.

Page 20: Intermediate 2 Computing Computer structure. Organisation of a simple computer.

Clock speed

• The clock speed gives you an indication of the performance of the processor, which is at the heart of the processor, but do no over emphasize the importance of clock speed.

• The performance of the processor is not dictated by the processor alone. Other factors are also important such as the data bus width.

Page 21: Intermediate 2 Computing Computer structure. Organisation of a simple computer.

Application-based tests

• Most computer magazines use application-based tests (benchmark tests) to compare system performance.

• They set out a series of practical tasks using a range of standard application packages, award scores for the performance in each task and then use these scores to make overall comparisons.