EuraStudy
This chapter opens up the processor. It sets out the internal components and the stored-program concept, the von Neumann and Harvard architectures, the registers, arithmetic-logic unit, control unit and buses that make up the CPU, and the fetch-execute cycle that drives everything. It then descends to machine code and assembly with its addressing modes, and finishes with the factors that determine performance and the storage and embedded systems that surround the processor.
5 sections~17 min reading time3 competenciesLevel Foundation 1 · Standard 2 · Advanced 2
basic level
AS-Level expects the CPU components, the stored-program concept and the outline of the fetch-execute cycle.
higher level
The full A-Level adds the detailed register-transfer fetch-execute cycle, interrupts, addressing modes, assembly-language tracing, and reasoned evaluation of performance factors.
Reading depth: In depth
Text size: Standard
The von Neumann architecture
Explain, using the stored-program concept, how the same physical computer can run a word processor one moment and a game the next without any hardware change.
Under the stored-program concept a program is just a sequence of binary instructions held in main memory, indistinguishable in form from data.
To switch task the operating system loads a different program's instructions into memory; the CPU then fetches and executes those instead.
The fetch-execute cycle is identical whatever the instructions are, so no rewiring is needed - only the memory contents differ.
Result: Because instructions live in changeable memory, one general-purpose machine runs any program simply by loading it - the essence of the stored-program computer.
Typical mistakes
Active revision
Explain the stored-program concept and state one advantage and one disadvantage of the von Neumann architecture compared with the Harvard architecture.
Active recall
Recall the key points — then reveal.
Sources: GCE AS and A level subject content for computer science (Department for Education) · AQA A-level Computer Science 7517 specification (AQA)
The CPU registers and their roles
Addressable memory
An address bus of lines can select distinct memory locations; each extra line doubles the range.
A processor has a 16-line address bus, and each addressable location stores one byte. How much memory can it address? What happens if the address bus is widened to 20 lines?
locations. At one byte each that is 65 536 bytes = 64 KiB.
locations = 1 MiB - each extra line doubles the range, so four more lines multiply it by .
Result: 16 lines address 64 KiB; 20 lines address 1 MiB. Bus width directly limits how much memory a processor can use.
Typical mistakes
Active revision
State the role of the PC, MAR, MBR and CIR. Then calculate how many memory locations can be addressed with a 16-line address bus, and how the addressable memory changes if two more address lines are added.
Active recall
Recall the key points — then reveal.
Sources: AQA A-level Computer Science 7517 specification (AQA)
The fetch-execute cycle
Write out, in order, the register transfers that make up the fetch phase of the fetch-execute cycle, explaining each.
The address of the next instruction, held in the program counter, is copied into the memory address register so memory can be told which location to read. ()
The control unit asserts a read on the control bus; the instruction at address MAR travels along the data bus into the memory buffer register. ()
The program counter is incremented so it now points to the following instruction. ()
The fetched instruction is transferred from the buffer to the current instruction register, ready for the control unit to decode. ()
Result: After the fetch, the instruction is in the CIR and the PC already points to the next one, so decoding and execution can proceed and the cycle can repeat cleanly.
Typical mistakes
Active revision
Write out the fetch phase of the fetch-execute cycle as a sequence of register transfers, then explain what the CPU does with its registers when a higher-priority interrupt arrives during execution.
Active recall
Recall the key points — then reveal.
Sources: AQA A-level Computer Science 7517 specification (AQA)
The four addressing modes
Trace the LMC program: INP; STA 99; INP; ADD 99; OUT; HLT with inputs 3 then 5. Give the accumulator and location 99 after each instruction, and the output.
First input: ACC = 3. STA 99 stores the accumulator into mailbox 99, so location 99 = 3 (ACC still 3).
Second input overwrites the accumulator: ACC = 5. Location 99 is unchanged at 3.
Add the contents of location 99 to the accumulator: ACC = .
OUT outputs the accumulator, 8; HLT stops the program.
Result: The program outputs 8. It shows the load-store pattern: values move between the accumulator and memory, and the ALU adds through the accumulator.
Typical mistakes
Active revision
For a location 50 that contains the value 8, and an index register X = 3, state the value loaded by each of LDA #50, LDA 50, and LDA 50,X (assume location 53 contains 20). Then trace an LMC program that inputs two numbers and outputs their sum.
Active recall
Recall the key points — then reveal.
Sources: AQA A-level Computer Science 7517 specification (AQA)
Typical mistakes
Active revision
A laptop is slow when switching between many open programs. Explain how increasing the amount of RAM, the cache size and the number of cores might each help, and recommend the most relevant change. Then compare an HDD and an SSD for a laptop.
Active recall
Recall the key points — then reveal.
Sources: GCE AS and A level subject content for computer science (Department for Education)
References & sources
Department for Education