Skip to the worksheet
Revision Library
Choose a subject

Structure and Function of the Processor - Worksheets, Questions and Revision

10 original exam-style questions - 5 pages of questions with a full mark scheme - free printable PDF.

This topic is chapter 1 of A Level Computer Science Topic Workbook 1 and chapter 1 of A Level Computer Science 10-Minute Tests.

Revision Library
revisionlibrary.co.uk
A-Level · Computer Systems

1.1 Structure and Function of the Processor

OCR H446 · Calculators not allowed · about 85 minutes
Total Marks
Name: _______________________________    Date: ____ / ____ / ______
Answer ALL questions. Show all your working.
1
The Control Unit, Arithmetic Logic Unit and system clock each have a distinct role within the processor.
(a)State the purpose of the Control Unit (CU).(2)
(b)State the purpose of the Arithmetic Logic Unit (ALU).(2)
(c)State the purpose of the system clock in a processor.(2)
(Total for Question 1 is 6 marks)
2
The processor uses several special purpose registers during the fetch, decode, execute cycle: the Program Counter (PC), Memory Address Register (MAR), Memory Data Register (MDR), Current Instruction Register (CIR) and the Accumulator (ACC).
(a)Complete the table by writing the correct register (PC, MAR, MDR or CIR) next to the function it performs.
i) Holds the address of the next instruction to be fetched.
ii) Holds the address currently being accessed in memory, for a read or a write.
iii) Holds data or an instruction that has just been fetched from memory, or is about to be written to memory.
iv) Holds the instruction that is currently being decoded or executed.
(4)
(b)State the name of the register that holds the results of calculations performed by the ALU.(1)
(c)Explain why the Program Counter must be incremented during the fetch stage, even before the fetched instruction has been decoded.(3)
(Total for Question 2 is 8 marks)
3
The CPU is connected to main memory by a system of buses.
(a)State the purpose of the address bus.(1)
(b)State the purpose of the data bus.(1)
(c)State the purpose of the control bus.(1)
(d)The address bus is unidirectional, but the data bus is bidirectional. Explain why the data bus needs to be bidirectional.(2)
(e)State one consequence of increasing the width (number of bits) of the data bus.(1)
(Total for Question 3 is 6 marks)
4
A simple program is stored in main memory as follows:
address 100: LDD 200 (load the value directly from address 200 into the accumulator)
address 101: ADD 201 (add the value directly from address 201 to the accumulator)
address 102: STO 202 (store the value in the accumulator directly to address 202)
address 200: 15
address 201: 9
address 202: (currently empty)
The Program Counter starts at 100.
(a)Complete the trace table for the fetch stage of the instruction at address 100 (LDD 200) by giving the value placed in each register after each RTN step.
Step 1: MAR <- [PC] MAR = ?
Step 2: PC <- [PC]+1 PC = ?
Step 3: MDR <- [[MAR]] MDR = ?
Step 4: CIR <- [MDR] CIR = ?
(4)
(b)State the register transfer notation for the execute stage of LDD 200, and give the resulting value held in the Accumulator (ACC).(2)
(c)Using the same method, state the value held in the Accumulator after the instruction at address 101 (ADD 201) has been executed.(2)
(d)State the value written to memory address 202 once the instruction at address 102 (STO 202) has been executed.(1)
(e)Convert the memory address 202 (denary) to hexadecimal. Show your working.(1)
(Total for Question 4 is 10 marks)
5
A processor has a clock speed of 3.2 GHz. On average, each instruction requires 4 clock cycles to complete.
(a)Calculate the number of instructions the processor can execute in one second. Show your working.(3)
(b)Explain why simply increasing clock speed indefinitely is not a practical way of improving a processor's performance.(3)
(Total for Question 5 is 6 marks)
6
Cache memory is used to reduce the average time the processor spends waiting for data from RAM.
(a)State what is meant by 'cache memory'.(2)
(b)The principle of locality of reference underpins how cache improves performance. Describe what is meant by temporal locality and spatial locality, and briefly explain how each helps cache improve performance.(4)
(Total for Question 6 is 6 marks)
7
Many modern processors contain more than one core on a single chip.
(a)Describe what is meant by a multicore processor.(2)
(b)Explain two limitations of using a multicore processor to improve overall system performance.(4)
(c)State one type of task that would benefit significantly from running on a multicore processor.(1)
(Total for Question 7 is 7 marks)
8
Modern processors use pipelining to increase the rate at which instructions are processed.
(a)State the three main stages of the standard instruction pipeline.(3)
(b)Explain what is meant by pipelining in the context of processor performance.(2)
(c)A non-pipelined processor takes 4 clock cycles to fully execute one instruction (no overlap between instructions). A pipelined version of the same processor splits execution into 4 equal stages, one per clock cycle, so that once the pipeline is full, one instruction completes every clock cycle. Calculate the number of clock cycles required to execute a sequence of 100 instructions (i) without pipelining and (ii) with pipelining. Show your working.(3)
(d)Hence calculate the speedup factor achieved by pipelining for this sequence of instructions, to 2 decimal places.(1)
(Total for Question 8 is 9 marks)
9
A school is upgrading its computer suite and is choosing between two processor specifications for workstations that will mainly be used to run video editing software:
Processor X: clock speed 3.6 GHz, 4 cores, 8 MB L3 cache.
Processor Y: clock speed 4.2 GHz, 2 cores, 4 MB L3 cache.
The video editing software used is able to make use of multiple cores when rendering effects and exporting finished videos.
Discuss the factors that affect processor performance, and evaluate which of Processor X or Processor Y is likely to be more suitable for this video editing task. Justify your conclusion.
(Total for Question 9 is 9 marks)
10
The instruction ADD 300 adds the value stored at memory address 300 to the value already held in the accumulator. Assume the operand address (300) has already been placed in the CIR alongside the opcode.
(a)Using register transfer notation, write the sequence of statements for the fetch stage of any instruction.(4)
(b)Using register transfer notation, write the sequence of statements for the execute stage of the instruction ADD 300.(2)
(Total for Question 10 is 6 marks)
Mark scheme · 1.1 Structure and Function of the Processor

Question 1

  • (a) decodes the instruction held in the CIR oeB1
  • (a) generates and sends the control signals needed to coordinate/manage the components of the CPU during execution oeB1
  • (a) Answer: The CU decodes instructions and generates the control signals that coordinate the CPU's components.
  • (b) carries out arithmetic operations, e.g. addition, subtraction oeB1
  • (b) carries out logical operations/comparisons, e.g. AND, OR, NOT, greater than oeB1
  • (b) Answer: The ALU performs arithmetic operations (e.g. addition) and logical operations/comparisons.
  • (c) generates regular electrical pulses/a timing signal oeB1
  • (c) used to synchronise the operations of the CPU's components, controlling the rate at which instructions are processed oeB1
  • (c) Answer: The clock produces regular timing pulses that synchronise the CPU's components and set the rate of processing.

Question 2

  • (a) i) PC (Program Counter)B1
  • (a) ii) MAR (Memory Address Register)B1
  • (a) iii) MDR (Memory Data Register)B1
  • (a) iv) CIR (Current Instruction Register)B1
  • (a) Answer: i) PC, ii) MAR, iii) MDR, iv) CIR
  • (b) Accumulator (ACC)B1
  • (b) Answer: Accumulator (ACC)
  • (c) the PC must hold the address of the next instruction to be fetched oeB1
  • (c) incrementing it early ensures instructions are normally executed in the correct sequential order, one after another oeB1
  • (c) unless the current instruction is a jump/branch instruction, in which case the PC is overwritten with a new address once that instruction is executed oeB1
  • (c) Answer: The PC is incremented early so it is ready to point to the next sequential instruction, unless a jump/branch later overwrites it.

Question 3

  • (a) carries the memory address of the location to be read from or written to oeB1
  • (a) Answer: Carries the address of the memory location being accessed.
  • (b) carries the actual data or instructions being transferred between the CPU and memory oeB1
  • (b) Answer: Carries the data/instructions transferred between the CPU and memory.
  • (c) carries control signals, e.g. read/write signals, clock signals or interrupt signals, that coordinate/synchronise the transfer of data between components oeB1
  • (c) Answer: Carries control signals (e.g. read/write, clock, interrupt) that coordinate data transfer.
  • (d) data must be able to travel from memory to the CPU, e.g. when a value is read/loaded oeB1
  • (d) and from the CPU to memory, e.g. when a result is written/stored, whereas an address only ever needs to travel from the CPU to memory to specify a location oeB1
  • (d) Answer: Data must flow both ways (memory to CPU on a read, CPU to memory on a write), whereas addresses only ever travel from CPU to memory.
  • (e) more bits/bytes of data can be transferred between the CPU and memory in a single operation/clock cycle, improving performance/throughput oeB1
  • (e) Answer: More data can be transferred per operation, improving performance.

Question 4

  • (a) MAR = 100, caoB1
  • (a) PC = 101, caoB1
  • (a) MDR = LDD 200, cao (the instruction stored at address 100)B1
  • (a) CIR = LDD 200, ft from MDRB1
  • (a) Answer: MAR = 100, PC = 101, MDR = LDD 200, CIR = LDD 200
  • (b) MAR <- [CIR operand] (i.e. MAR <- 200); MDR <- [[MAR]]; ACC <- [MDR], oe (any correct logic, ignore minor notation differences)M1
  • (b) ACC = 15, caoA1
  • (b) Answer: ACC <- [MDR] where MDR holds the value at address 200; ACC = 15
  • (c) ACC <- [ACC] + [MDR], where MDR holds the value fetched from address 201 (value 9), oeM1
  • (c) ACC = 24, cao (ft from part b if a different value for ACC was carried forward consistently)A1
  • (c) Answer: ACC = 24
  • (d) 24, cao (ft from part c)B1
  • (d) Answer: 24
  • (e) CA, cao (working shown, e.g. 202 = 12x16 + 10)B1
  • (e) Answer: CA

Question 5

  • (a) 3.2 GHz converted to Hz, i.e. 3.2 x 109 cycles per second, oeM1
  • (a) 3.2 x 109 divided by 4, correct method to find instructions per second oeM1
  • (a) 8 x 108 instructions per second, awrt (accept 800,000,000 or 800 million), caoA1
  • (a) Answer: 8 x 108 instructions per second (800,000,000)
  • (b) a higher clock speed causes the processor to generate more heat, which risks damage or errors if not adequately cooled oeB1
  • (b) a higher clock speed increases power consumption, which is a particular problem for battery powered/mobile devices oeB1
  • (b) there are physical limits to how fast transistors can reliably switch, and overall performance may also be limited by other bottlenecks (e.g. RAM speed), so gains are limited oeB1
  • (b) Answer: Higher clock speeds increase heat and power consumption and are limited by physical switching speed and other system bottlenecks, so performance gains are not unlimited.

Question 6

  • (a) a small amount of very fast memory, located on or very close to the CPU oeB1
  • (a) used to store instructions and data that have recently been used, or are likely to be needed again soon, to reduce the time spent accessing slower RAM oeB1
  • (a) Answer: Cache is a small, very fast memory close to the CPU that stores frequently/recently used instructions and data, reducing waiting time for RAM.
  • (b) temporal locality: if a memory location/instruction has recently been accessed, it is likely to be accessed again soon oeB1
  • (b) so keeping recently used items in cache means future requests for them can be served quickly from cache rather than slower RAM oeB1
  • (b) spatial locality: if a memory location is accessed, nearby/neighbouring locations are also likely to be accessed soon oeB1
  • (b) so when data is fetched, nearby memory locations are also copied into cache, meaning they will already be present when needed oeB1
  • (b) Answer: Temporal locality: recently used items are likely to be reused soon, so cache keeps them ready. Spatial locality: nearby locations are likely to be used soon, so cache pre-loads them too.

Question 7

  • (a) a single chip that contains two or more independent processing units (cores) oeB1
  • (a) each core can carry out its own fetch, decode, execute cycle at the same time as the others oeB1
  • (a) Answer: A processor with two or more independent cores on one chip, each able to run its own fetch, decode, execute cycle simultaneously.
  • (b) limitation 1 identified: not all software is written/optimised to make use of more than one core oeB1
  • (b) expansion: some tasks are inherently sequential, where each step depends on the result of the previous one, so they can only run on a single core no matter how many are available oeB1
  • (b) limitation 2 identified: coordinating/communicating between cores (e.g. sharing data, avoiding conflicts) introduces overhead oeB1
  • (b) expansion: this overhead, together with heat and power demands of extra cores, means performance does not increase in direct proportion to the number of cores added oeB1
  • (b) Answer: Software must be written to exploit multiple cores, and sequential dependencies limit parallelism; coordination overhead and heat/power costs mean performance does not scale directly with core count.
  • (c) any suitable highly parallelisable task, e.g. video rendering/encoding, running multiple independent applications at once, scientific/matrix simulations oeB1
  • (c) Answer: For example, video rendering, where independent frames/effects can be processed in parallel across cores.

Question 8

  • (a) FetchB1
  • (a) DecodeB1
  • (a) Execute (oe; must be in this order for all 3 marks, otherwise max 1 mark for the correct set of names)B1
  • (a) Answer: Fetch, decode, execute
  • (b) the fetch, decode and execute stages of successive instructions are overlapped, rather than one instruction fully completing before the next begins oeB1
  • (b) so, once the pipeline is full, one instruction can be completed every clock cycle, increasing the overall rate/throughput of instruction processing oeB1
  • (b) Answer: Pipelining overlaps the stages of successive instructions so that, once full, one instruction completes per clock cycle, increasing throughput.
  • (c) (i) 400 cycles, cao (100 x 4)B1
  • (c) (ii) correct method shown: (number of stages - 1) + number of instructions, i.e. 3 + 100 oeM1
  • (c) (ii) 103 cycles, caoA1
  • (c) Answer: (i) 400 clock cycles, (ii) 103 clock cycles
  • (d) 3.88, ft from part c (400 / 103), awrtB1
  • (d) Answer: 3.88 (2dp)

Question 9

  • Level 3 A detailed, well-organised discussion that accurately explains at least three relevant performance factors (e.g. clock speed, number of cores, cache size, and/or software optimisation), applies them specifically to the figures given for Processor X and Processor Y, and reaches a clear, well-justified conclusion about suitability for the video editing task. Correct technical terminology is used consistently and accurately.7-9
  • Level 2 A reasonable discussion covering at least two relevant performance factors, with some application to the processor specifications given, reaching a conclusion. However, the discussion may be unbalanced, an important factor may be omitted, application to the scenario may be only partial, or the justification for the conclusion may be incomplete. Mostly correct terminology.4-6
  • Level 1 Basic or generic statements about one or two performance factors, with little or no application to the specific figures or scenario given. A conclusion, if present, is largely unsupported.1-3
  • Level 0 No relevant content, or the response does not address the scenario.0
  • Indicative content:
    • Clock speed determines the number of fetch, decode, execute cycles completed per second, so Processor Y's higher clock speed (4.2 GHz vs 3.6 GHz) allows it to complete more cycles per second on a single core
    • Number of cores allows work to be split and processed in parallel; Processor X has more cores (4 vs 2)
    • Since the video editing software can make use of multiple cores for rendering and exporting, these tasks are highly parallelisable, so having more cores available (Processor X) is likely to be more beneficial than a higher clock speed on fewer cores
    • Cache size affects how much frequently used data (e.g. video frame buffers) can be held close to the CPU; Processor X's larger 8 MB cache should reduce the time spent waiting for slower RAM more than Processor Y's 4 MB cache, which is likely to help with large video files
    • A counter-argument: for any part of the software that is single threaded (e.g. certain preview or user interface operations), Processor Y's higher clock speed per core may give faster performance on that part of the workload
    • Overall performance depends on the combination of these factors together with how well the specific software is optimised, not on any single figure in isolation
    • A justified conclusion, e.g. Processor X is likely to be more suitable overall, because its extra cores and larger cache are better matched to a workload (rendering/exporting) that is described as multi-core optimised, outweighing Processor Y's higher clock speed
    • Credit an alternative conclusion (e.g. favouring Processor Y) if it is clearly and specifically justified using the figures and factors given

Question 10

  • (a) MAR <- [PC], oe (any correct logic, ignore minor differences in notation)M1
  • (a) PC <- [PC] + 1, oeM1
  • (a) MDR <- [[MAR]], oe (transfer via the data bus from the memory location addressed by MAR)M1
  • (a) CIR <- [MDR], oeM1
  • (a) Answer: MAR <- [PC]; PC <- [PC]+1; MDR <- [[MAR]]; CIR <- [MDR]
  • (b) MAR <- [CIR operand] (i.e. MAR <- 300); MDR <- [[MAR]], oe (any correct logic, ignore minor syntax; fetches the value to be added)M1
  • (b) ACC <- [ACC] + [MDR], oe (correctly adds the fetched operand to the current accumulator value)A1
  • (b) Answer: MAR <- 300; MDR <- [[MAR]]; ACC <- [ACC] + [MDR]

Mark your answers

Check answers without an account. Some answers can be checked automatically; use the mark scheme to mark the rest.

Question 1

6 marks
Did your answer earn the marks?

Question 2

8 marks
Did your answer earn the marks?

Question 3

6 marks
Did your answer earn the marks?

Question 4

10 marks
Did your answer earn the marks?

Question 5

6 marks
Did your answer earn the marks?

Question 6

6 marks
Did your answer earn the marks?

Question 7

7 marks
Did your answer earn the marks?

Question 8

9 marks
Did your answer earn the marks?

Question 9

9 marks
Did your answer earn the marks?

Question 10

6 marks
Did your answer earn the marks?
Mark my answers

Worksheets are written for Revision Library and come with a full mark scheme; a few English packs quote an out-of-copyright text, and name it on the page. Exam board names and specification codes say which qualification a pack suits: we are not affiliated with, endorsed by or approved by any exam board, and no past-paper question is reproduced here. Rights queries: hello@revisionlibrary.co.uk