Computer Science · A1

Computer fundamentals

Descend into the core of the machine: the CPU, memory, data in binary, logic gates and the operating system that governs it all. In 7Quest it is Silicon Core: 14 stages, 139 quick questions and 40 exam-style ones.

What the stages cover

Codes follow the 2027 guide (A1–A4 and B1–B4). HL-only stages are marked. Each stage is a short lesson, quick questions, a minigame and an exam-style question.

  1. The heart of the CPU
    Name every component of the CPU, explain how they interact over the buses and describe the fetch-decode-execute cycle step by step.
    Syllabus A1.1.1, A1.1.5
  2. GPU and the memory hierarchy
    Describe the role of the GPU and explain how registers, cache, RAM and ROM work together so that the CPU does not have to wait (HL extension: compare the CPU and GPU on the six criteria in the syllabus).
    Syllabus A1.1.2, A1.1.3, A1.1.4
  3. Pipelining and multi-core processorsHL
    Explain how pipelining overlaps the stages of the instruction cycle and how multi-core processors run work in parallel, and work out cycle counts.
    Syllabus A1.1.6
  4. Secondary storage and the cloud
    Choose and justify the right secondary storage for each situation and distinguish SaaS, PaaS and IaaS by who manages each layer.
    Syllabus A1.1.7, A1.1.9
  5. Binary and hexadecimal
    Convert fluently between binary, denary and hexadecimal, calculate the range of n bits and explain why hexadecimal is used.
    Syllabus A1.2.1
  6. Everything is binary: text, images and sound
    Explain how characters, images, sound and video are encoded in binary and calculate the size of uncompressed files.
    Syllabus A1.2.2
  7. Lossless and lossy compression
    Distinguish lossless from lossy compression, apply RLE by hand, explain the idea behind transform coding and justify which to use in each case.
    Syllabus A1.1.8
  8. Logic gates and truth tables
    Recognise the seven logic gates by symbol, notation and behaviour, and construct truth tables with up to three inputs using intermediate columns.
    Syllabus A1.2.3, A1.2.4
  9. Logic circuits
    Go from expression to diagram, from diagram to expression and from a real situation to an expression and truth table, and simplify simple expressions.
    Syllabus A1.2.4, A1.2.5
  10. The operating system
    Describe the role of the operating system as an abstraction layer and resource manager and explain each of its functions with examples.
    Syllabus A1.3.1, A1.3.2
  11. Scheduling and interrupts
    Compare FCFS, round robin, priority and multilevel queue scheduling by calculating waiting and turnaround times, and evaluate polling versus interrupts.
    Syllabus A1.3.3, A1.3.4
  12. Multitasking, resource allocation and deadlockHL
    Explain how the operating system shares the CPU and other resources between tasks, and how resource contention can lead to deadlock.
    Syllabus A1.3.5
  13. Control systemsHL
    Describe the components of a control system and explain how feedback loops control real devices.
    Syllabus A1.3.6, A1.3.7
  14. Interpreters and compilersHL
    Evaluate how compilers and interpreters translate code, and choose the right one for a scenario.
    Syllabus A1.4.1

Two questions to try

Written for 7Quest in the style of the exam, not taken from past papers. Answer first, then open the markscheme.

Explain3 marksThe heart of the CPU

Explain why a quad-core processor does not necessarily run a program four times faster than a single-core processor with the same clock speed.

Show the markscheme

Markscheme (3 marks)

  1. The program must be written to use multiple threads; if it is single-threaded it only uses one core.
  2. Part of the program is sequential / depends on earlier results and cannot be divided.
  3. Coordinating the cores (synchronisation, communication) takes extra time.
  4. The cores compete for shared resources (L3 cache, bus, RAM), which creates bottlenecks.
  5. (Any 3.)

A full-marks answer

Four cores only improve performance if the work can be divided between them: a single-threaded program will still use only one core. Even in parallel programs there are sequential parts that depend on earlier results and must wait, and synchronisation between cores adds extra work. In addition, the cores share the L3 cache and access to RAM, so they compete for them. For all these reasons the real speed-up is less than four times.

Explain8 marksPaper 1 styleHLChallengePipelining and multi-core processors

A games console has a quad-core processor. Each core has a four-stage pipeline (fetch, decode, execute, write-back) and each stage takes one clock cycle.

(a) One core executes 9 independent instructions. Calculate the number of clock cycles needed with pipelining and without pipelining. [2]

(b) In another sequence, the second instruction uses the result of the first. Explain why this reduces the benefit of pipelining. [2]

(c) Describe how the four cores can run the game’s work independently and in parallel. [2]

(d) Explain why the game does not run four times faster on the quad-core processor than on a single core of the same design. [2]

Show the markscheme

Markscheme (8 marks)

  1. (a) Without pipelining: 4×9=364 \times 9 = 36 cycles.
  2. (a) With pipelining: 4+(9−1)=124 + (9 - 1) = 12 cycles.
  3. (b) The second instruction needs a value that the first has not yet written back (data dependency / data hazard).
  4. (b) So it must wait / stall cycles (bubbles) are inserted, and the instructions behind it are delayed too, so fewer instructions complete per cycle.
  5. (c) Each core has its own pipeline, registers and L1/L2 cache, and fetches and executes its own instructions.
  6. (c) The OS schedules different threads (e.g. physics, audio, AI, rendering preparation) on different cores, which run at the same time.
  7. (d) Parts of the game are sequential / depend on earlier results and cannot be split between cores.
  8. (d) Threads must synchronise / share data, and the cores compete for the shared L3 cache and RAM, which causes waiting.

A full-marks answer

(a) Without pipelining each instruction takes all 4 cycles in turn: 4×9=364 \times 9 = 36 cycles. With pipelining the first instruction takes 4 cycles and the remaining 8 finish one per cycle: 4+(9−1)=124 + (9 - 1) = 12 cycles.

(b) The second instruction depends on a result that the first instruction only writes back in its final stage. Until then its operands are not available, so the core inserts stall cycles; the instructions behind it are held up as well, so the pipeline no longer completes one instruction per cycle.

(c) Each of the four cores is a complete processor with its own pipeline, registers and cache. The operating system schedules a different thread of the game on each core, for example physics on one, audio on another and AI on a third, so the cores fetch and execute their own instruction streams at the same time without waiting for each other.

(d) Not all of the game can be split into parallel threads: some steps depend on the results of earlier ones and must run in sequence on one core. The threads also have to synchronise and exchange data, and all four cores compete for the shared L3 cache and main memory, so the real speed-up is less than four.

The other 38 questions in this topic are in the app, marked point by point, and anything you miss comes back in your review. If this is the topic you find hardest, you can make it your free topic and do all of it, with short practice tests on it, without paying or giving a card.

Start Computer Science free