Question 2
OCR Computer Science June 2019 Paper 2GCSE14 marks
On the specification
- (a)
- 2.1 Algorithms2.2 Programming techniques
- (b)
- 2.1 Algorithms2.2 Programming techniques
- (c)
- 2.5 Translators and facilities of languages
Question text
2 A programmer creates an algorithm using a flow chart. Start Input X Input Y FALSE Output X > Y ? Y * X TRUE FALSE X < 12 ? TRUE Output Output X Y End (a) Complete the table to give the output when each of the following set of values are input into the algorithm as X and Y. Input value of X Input value of Y Output 15 10 65 23 12 2 [4] (b) Write this algorithm using pseudocode. [6] The algorithm is written in a high‑level language. The high level code must be translated into machine code before a computer processor can execute it. (c) Describe two methods of translating high level code into machine code. 1 2 [4]