Cambridge A2 Level Computer Science 9618 · 16.2 Translation Software

Q19 · 9618/31/O/N/22 Q4

Worked solution from the System Software Paper 3 Advanced Theory booklet, Part 2 of 2.

Q199618/31/O/N/22original Q4Structured · 4 marks
Question 4 from 9618/31/O/N/22

Worked solution

Draw one line from each stage to its description:

Lexical analysis → converting a sequence of characters into a sequence of tokens [1]

Syntax analysis → using parsing algorithms to interpret the meaning of a sequence of tokens [1]

Code generation → converting an intermediate representation of source code into an executable form [1]

Optimisation → minimising a program's execution time and memory requirement [1]

'Directly executing instructions written in a scripting language' is not used.

KEY IDEACompilation goes lexical analysis, syntax analysis, code generation and optimisation, each with its own job.
TOTAL 4 marks

Official mark scheme

Mark scheme for 9618/31/O/N/22 question 4
VIDEO
▶ Whole paper

Video solution of the whole paper · by MAK CS. Tap the picture to open it on YouTube.

Solutions follow the official Cambridge mark schemes; marks are shown in grey. Videos are from other YouTube channels. Paper codes read component / series / year: M/J = May/June, O/N = October/November. Past-paper questions © UCLES, reproduced for classroom practice.