Past-paper question · 2004 May-June · Paper 3 · Q7(b)

Question 7(b) 2004 · May-June · Paper 3 · 4 marks

Original past-paper question for 7(B)
Original past-paper question for 7(B)
Reveal official mark-scheme answer

The answer for this question is in the official mark scheme.

Show text version of question

Question 7

Part (b)

Question 7

VARIABLE NAME is defined in a particular language as an alphabetic character which may be

followed by two digits or another alphabetic character. Given that, in Backus-Naur Form (BNF), an alphabetic character is called an ALPHA and is defined as <ALPHA> ::= A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z and a digit is defined as <DIGIT> ::= 0|1|2|3|4|5|6|7|8|9

Part (b)

The definition of a variable name is altered.

A
variable name is now defined as either
  • an alpha followed by two digits, where the first digit must not be zero,
  • OR

  • an unlimited set of alpha characters.

Write new rules in BNF that will define the new <VARIABLE NAME>.

[4]
Topic relevance

Why this question appears here

71% assigned-topic match · Hardware › Logic gates and logic circuits

Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.

Permanent source page: Educate A Change · From 9691_s04_qp_3.pdf

Keep practising this topic