Past-paper question · 2016 October-November · Paper 32 · Q2(c)(iii)

Question 2(c)(iii) 2016 · October-November · Paper 32 · 2 marks

Original past-paper question for 2(C)(III)
Original past-paper question for 2(C)(III)
Reveal official mark-scheme answer Official mark-scheme answer for 2(C)(III)

Official answer for Question 2

Part (c)

(iii)

(iii)

Rules of precedence means different operators have different priorities // by example

✓
multiply is done before add
[1]
✓
In RPN evaluation of operators is left to right // operators are used in the sequence in
✓
which they are read
[1]
✓
No need for brackets // infix may require the use of brackets
[1]
✓
[Max 2 ]
✓
Mark Scheme
✓
Syllabus
✓
Paper
✓
Cambridge International A Level – October/November 2016
✓
9608

Question 32

Mark scheme 9608_w16_ms_32.pdf →

Show text version of question

Question 2

Part (c)

(iii)

Question 2

There are four stages in the compilation of a program written in a high-level language.

An interpreter is executing a program. The program uses the variables a, b, c and d.

The program contains an expression written in infix form. The interpreter converts the infix expression to RPN. The RPN expression is:

b a * c d a + + -

The interpreter evaluates this RPN expression using a stack.

The current values of the variables are:

a = 2 b = 2 c = 1 d = 3

(iii)

One advantage of using RPN is that the evaluation of an expression does not require

rules of precedence.

Explain this statement.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

......................................................................................................................................

[2]

Question 6

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 9608_w16_qp_32.pdf

Keep practising this topic