Learning Outcomes
• describe the internal components of a computer system: processor, clock, main memory, cache memory, buses (address, data and control), input/output (I/O) controllers, registers and ports;
• describe the fetch-execute cycle;
• evaluate the factors that can influence the speed of processing: processor type and clock speed;
The processor
Computer systems generally consist of three main components: the internal components that are involved in processing data and or a set of instructions in the form of a computer program, memory which holds the programs and data being processed and input /output devices; used for communication with the outside world. We shall consider here, the function of the internal components of a computer system.
The processor consists of the Control Unit (CU), a series of registers and the Arithmetic Logic Unit (ALU).
Control Unit
The control unit is a digital circuit that coordinates the movement of data, the sequencing of instructions and directs the operation of the other components of a computer system by providing control and timing signals. Timing signals are provided by an internal clock which helps to synchronize the operation of the internal components and which helps determine how many computer instructions are carried out (executed) each second. The CPU needs a certain number of clock ticks to carry out each instruction. Clock speed is expressed in megahertz (MHz) or gigahertz (GHz).
Arithmetic Logic Unit
The Arithmetic Logic Unit (ALU) is digital circuit which forms part of the processor. It carries out mathematical and logical operations on data associated with instructions being executed.
Registers
Internal Memory Much as we need to remember steps and values to perform even the simplest calculations, so too must the processor have somewhere to store the data and instructions currently being operated upon. Main memory and cache memory are two types of memory used by the processor in the execution of instructions.
Main Memory (RAM)
Main Memory Main memory is often referred to as RAM or Random Access Memory or Immediate Access Memory. Main memory at any time during the operation of the computer stores a portion of the operating system, application software currently running and other data items the processing unit needs when carrying out operations. Main memory is volatile, meaning when the power is removed from the system the data will be lost, it is referred to as random access memory because the processor can go directly to any location to access an item of data; it does not have to access the memory locations in a particular (sequential) order.
Cache Memory
Cache Memory Cache memory is a form of RAM which can be accessed, by the processor, at a faster rate than main memory. It is high speed volatile memory that is often integrated into the processor chip (as shown in the diagram above) or it may sit between the processor and main memory in the form of a separate memory chip. Cache memory is used to store copies of the contents of the most frequently used memory locations. During the processing of data items, the processor will search cache first before searching the main memory.
Buses
Buses Operating in isolation, each of the internal components of a typical computer system has a very specific function. Communication between each of these components is necessary during the execution of program instructions. Communication systems known as buses are used to support the transfer of signal between the internal components of computer system (internal buses) and to allow for communication with the various input and output (I/O) devices used for communication with the outside world (external buses). A bus is basically a set of physical connections in the form of set of physical cables or printed circuits used to connect the various hardware components used in the execution of a set of instructions.
Address Bus
Will be used to identify a physical location in memory to be accessed. The location may be accessed to read data from or write data to memory. If an item of data is to be stored in memory the location to be used as a repository for the data item will be identified using the address bus.
Data Bus
Allows for the transfer of data between one component of a processor or computer system and another. If an item of data is to be stored in memory, the data item will travel to the memory location via the data bus.
Control Bus
Carries commands from the CPU to other devices in relation to the instructions being executed at a particular time. If an item of data is to be stored in memory the control bus will carry the write command to the memory location.
Ports
While buses allow for the transfer of data between various components in a computer system it is important to also consider how the data can be transferred from the input/output devices to the internal components of the computer. To allow data to be transferred from peripheral devices they must be connected to the computer via an Input/Output (I/O) port. Types of computer ports include:–
Serial port which transmits one data bit at a time across a single wire, used mainly for connections to mice and modems
Parallel port which transmits multiple bits of data over multiple wires at one time and can be used to connect some printers. USB (Universal Serial Bus) ports now provide a high speed serial connection to most types of peripheral devices.
Registers
Registers were mentioned briefly at the beginning of this fact sheet. A register is a high speed memory location forming part of the processing unit. The registers listed below have an important role to play in the processing of instructions by the control unit in what is known as the fetch-execute cycle.
There are 4 different registers we need to be aware of.
Program Counter
Stores the address/location in memory of the next program instruction to be executed. As soon as an instruction has been fetched from memory the contents of the program counter are incremented to ensure it points to the next location to be accessed.
Memory Address Register
Stores the address of a memory location to be accessed either for a data/ instruction read or write
Memory Data Register
Stores data that has just been fetched from memory or data waiting to be stored / written to a location in memory
Current Instruction Register
Stores the instruction currently being executed by the processor
Fetch Execute Cycle
This is the basic principle on which modern CPUs operate. Data and instructions are fetched from memory, they are taken to the CPU where they are decoded (broken down) and executed (carried out). The next instruction is fetched... The cycle contines.
The fetch-execute cycle is the process used by a computer to retrieve a program instruction from memory, determine what that instruction is expected to do and then carry out the actions associated with that instruction. Let us consider how the registers and buses outlined previously can be used as part of the fetch-execute cycle.
The address of the first instruction to be read is loaded into the Program Counter (PC). Before data/instructions can be accessed from main memory the contents of the Program Counter (PC) are placed in the Memory Address Register. (The MAR will use the address bus to access the location where the instruction is stored).
The Program Counter (PC) is immediately updated to point to the location of the next instruction to be executed. A read signal will be sent via the control bus to memory and the instruction is transferred from memory to the Memory Data Register (MDR) via the data bus.
The instruction is then copied into the Current Instruction Register (CIR) where it will be examined or decoded by the processor. The flowchart below shows how this process is repeated for each instruction being executed as part of a larger program.
Processor Speed
By manipulating some of the components previously examined we can affect the speed of operation of the CPU.
Clock speed
Previously we looked at how microprocessors use an internal clock to control the number of instructions to determine how many instructions are executed per second by the CPU. If the CPU requires a specific number of clock ticks to execute an instruction then by increasing the clock rate (the number of clock ticks / cycles per second) we can increase the number of instructions executed per second; i.e. the faster the clock speed, the more instructions the CPU can execute per second.
Cache size
Cache memory provides high speed access to the most frequently used instructions and data items. By increasing the size of cache memory we can also increase the number of instructions and or data items being held in fast access memory in close proximity to the processor. Increasing the speed of access to a greater number of frequently accessed instructions and data items can help to increase the speed of operation of the processor.
Processor Type
Most computing devices can use one of two main types of processor known as Reduced Instruction Set Computing (RISC) or Complex Instruction Set Computing (CISC). As the name suggests RISC has a smaller number of instructions at its disposal during processing. This means that in complex processing tasks RISC processing units have to combine many simple instructions to complete each task meaning an increased number of fetch-execute cycles need to be completed to carry out complex tasks; thus slowing down the overall speed of processing.
The number of cores will also affect the speed of a processor. The more cores a processor has the more instructions which can be executed at the same time. A dual core is more efficient than a single core. A quad core is more efficient than a dual core.
Possible Exam Questions
1)Explain the role of each of the following components of a processor:-
a) Control Unit (2 Marks)
b) Arithmetic Logic Unit (ALU) (2 Marks)
c) Registers (2 Marks)
2)Main memory and Cache memory are used by the processor to support the execution of an application
a) Explain the role of main memory during the fetch execute cycle. (3 Marks)
b) Explain the difference between cache and main memory. (3 Marks)
3) Explain the purpose of the following buses:
Data Bus: (2 Marks)
Control Bus: (2 Marks)
Address Bus: (2 Marks)
4) Explain the difference between serial and parallel ports.(4 Marks)
5)Explain the role of the following internal components during the fetch execute cycle.
a.Program Counter (2 Marks)
b.Control Bus (2 Marks)
c. Memory Data Register (2 Marks)
6)Clock speed can have an impact on the speed at which a processor can execute instructions.
a.Explain the term clock speed. (2 Marks)
b.Explain how increasing the clock speed can increase the processing speed of a computer. (3 Marks)
c. Describe one other method of increasing the processing speed of a computer. (2 Marks)
4 (a) (i) Describe how the program counter is used during the fetch-execute cycle. [3]
It contains the address of the next instruction to be fetched/executed The contents are incremented when the instruction has been fetched/during the fetch cycle For a jump instruction, the contents may be changed during the execute cycle
(ii) Explain the difference between internal memory and secondary storage. [4]
Internal memory is part of the CPU It consists of RAM/ROM/cache memory Secondary storage is external to the CPU Example: magnetic/optical/flash media
(iii) Describe two ways in which the processing speed of a PC can be improved. 1. 2. [4]
Upgrade the processor type Example: dual/triple/quad/32 bit/64 bit/parallel processing (2 × [1]) Upgrade the clock ... to one with a faster clock rate/so that more instructions are executed per second (2 × [1])
(a) Describe each of the following components of a computer system.[6]
Immediate access memory
Part of internal memory Made up from random access memory/volatile memory Main memory
Address bus
Carries the location in memory ... to be accessed for reading/writing data
Port
A physical channel/socket/connection ... where peripherals/devices can be connected ... to enable data transfer between devices and the processor
(b) Explain how cache memory is used by the processor. [3]
Stores copies of contents of most frequently/recently accessed memory locations/data/applications/programs/data files/instructions The processor first searches cache memory ... before searching main memory
3 (a) Describe the role of each of the following during the fetch-execute cycle. [4 Marks]
Program counter
holds the address of the next instruction It is incremented
Current instruction register
Holds a copy … of the instruction being executed
(b) Name and describe the three buses used during the fetch-execute cycle.[6]
Name
Description
Name
Description
Name
Description
(c) Explain how each of the following can influence the speed of a computer. [4 Marks]
Processor type
Dual core/quad core processors Processors can be shared/tasks can be processed in parallel/more instructions can be fetched/executed at one tim
Cache memory
(a) A computer system consists of a number of internal components. Describe the purpose of each of the following. [4 Marks]
Clock
Produces pulses/timing signals … for the synchronisation … of operations between HW components/internal components
Port
Acts as a connection point … for IO devices … for data transfer
An automated teller machine (ATM) enables bank customers to perform a range of financial transactions.
(b) Describe the purpose of two input devices in a typical ATM. [4]
Card reader + type of input [1] + [1] Keypad + type of input [1] + [1] Touch screen/pad + type of input [1] + [1]
(c) Describe the purpose of two output devices in a typical ATM. 1. 2. [4]
(d) Describe two different ways in which a typical ATM can provide feedback to the user. [4]
Screen [1] + type of output [1] Printer [1] + type of output [1]
Auditory/speaker + type of feedback [1] + [1] Screen/printer message + type of feedback [1] + [1]
Increasing cache memory … will enable more frequently/recently accessed instructions/data to be held thus increasing processing speed
Name Address bus [1]
Description Transfers the address in memory/RAM to be accessed[1]
Name Data bus [1]
Transfers an instruction/data between processor components [1]
Name Control bus [1]
Description Transfers signals within the CPU [1]
Keywords