Skip to main content
A-LevelComputer ScienceSystem software9618/32 · May/June 2022 · Q413 Marks

The following syntax diagrams show the syntax of: • a variable • an unsigned integer • a letter a digit • an operator • an assignment statement. [Figure X.X showing syntax diagrams for variable, unsigned integer, letter, digit, operator, assignment statement]

  1. (a)The following assignment statements are invalid. State the reason in each case. X1 = Y2 - 12 Reason Z = Y12 + Z1 Reason[2]
  2. (b)Complete the Backus-Naur Form (BNF) for the syntax diagrams shown. <letter> has been completed for you. <variable> ::= <unsigned_integer> ::= <letter> ::= X | Y | Z <digit> ::= <operator> ::= <assignment_statement> ::=[5]
  3. (c)(i)Draw a syntax diagram for the new syntax of the assignment statement.[3]
  4. (c)(ii)Write the Backus-Naur Form (BNF) for your syntax diagram.[3]

This question uses a diagram from the original paper, which isn't shown here. Open the full paper from the past papers archive to see it.

Mark scheme

Marking points from the official mark scheme (May/June 2022). The mark or mark type is shown in brackets.

  1. [2] • An unsigned integer,12, is used instead of the last variable // 12 is not a valid variable • The variable Z is not a valid variable / missing an unsigned integer after the 2
  2. [5] One mark per bullet point • <variable> ::= <letter><unsigned_integer> • <unsigned_integer> ::= <digit>|<digit><digit> • <digit> ::= 1 | 2 | 3 and <operator> ::= + | - | * • <assignment_statement> ::= <variable>= <variable><operator><variable>
  3. [3] One mark adding both boxes... unsigned integer unsigned integer One mark for correct position(s) and connector(s) ... One mark ... rest correct (assignment statement) [Diagram showing a variable pointing to an equal sign, then branching to either a variable or unsigned_integer, then an operator, then another branch to either a variable or unsigned_integer]
  4. [3] Max three One mark for <assignment_statement>::=<variable>= One mark two or three correct options or two marks if all four options correct <variable><operator><variable> |<variable><operator><unsigned_integer> |<unsigned_integer><operator><variable> |<unsigned_integer><operator><unsigned_integer> or One mark for each section <operand>::=<variable>|<unsigned integer> <assignment_statement>::=<variable>= <operand><operator><operand>

Write your answer and get it marked

On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.

Sign up free →

About this question

Topic
System software, A-Level Computer Science (syllabus 9618). Structured question, 13 marks.
Source
A-Level Computer Science, May/June 2022 Paper 3 Variant 2, question 4.

Questions and mark schemes are from past examination papers and remain the copyright of the exam board. How Oracle Prep builds its content

Related Computer Science questions

© 2026 Oracle Prep