Computer Science 9608 · 11

11.1 Programming basics

169 questions in this subtopic. Open a question to solve it and check the official answer.

Reset
2018 October-November · Paper 32 · Q3(c)(ii)

Programming basics · 2 marks · official answer ready

(ii) Draw loops around appropriate groups of 1s in the table in part (c)(i) to produce an optimal sum-of-products. [2]

2018 October-November · Paper 32 · Q3(c)(iii)

Programming basics · 2 marks · official answer ready

(iii) Using your answer to part (c)(ii), write a simplified sum-of-products Boolean expression. X = ...............................................................................…

2018 October-November · Paper 32 · Q4(a)

Programming basics · 3 marks · official answer ready

(a) Complete the symbol table to show its contents after the lexical analysis stage. Token Symbol Value Type Number1 60 Variable Number2 61 Variable [3] 9

2018 October-November · Paper 33 · Q4(a)(iii)

Programming basics · 3 marks · official answer ready

(iii) The K‑map can be used to simplify the expression in part (a)(i). Draw loop(s) around appropriate groups of 1s in the table in part (a)(ii) to produce an optimal sum‑of‑produ…

2018 October-November · Paper 33 · Q4(a)(iv)

Programming basics · 3 marks · official answer ready

(iv) Write the simplified sum‑of‑products expression for your answer to part (a)(iii). X = ........................................................................................…

2018 October-November · Paper 33 · Q4(b)(ii)

Programming basics · 2 marks · official answer ready

(ii) Draw loop(s) around appropriate groups of 1s in the table in part (b)(i) to produce an optimal sum‑of‑products. [2]

2018 October-November · Paper 33 · Q4(b)(iii)

Programming basics · 2 marks · official answer ready

(iii) Write the simplified sum‑of‑products expression for your answer to part (b)(ii). X = ........................................................................................…

2018 October-November · Paper 33 · Q6(a)

Programming basics · 3 marks · official answer ready

(a) Complete the symbol table to show its contents after the lexical analysis stage. Token Symbol Value Type Start 60 Variable 1 61 Constant [3]

2018 October-November · Paper 43 · Q2(c)

Programming basics · 8 marks · official answer ready

(c) The random access file, MyBooks.dat, stores the data about the books in the format: A procedure, FindBook(): • prompts the user to input the ISBN of a book until the ISBN cont…

2018 May-June · Paper 12 · Q6(c)

Programming basics · 2 marks · official answer ready

(c) Describe the purpose of the statement on line 11. .............................................................................................................................…

2018 May-June · Paper 13 · Q3(a)

Programming basics · 4 marks · official answer ready

3 A computer is designed using the Von Neumann model. (a) Describe the role of the Arithmetic and Logic Unit (ALU) and Control Unit (CU) in the Von Neumann model. ALU ............…

2018 May-June · Paper 21 · Q3

Programming basics · 8 marks · official answer ready

3 In a chemical factory, a procedure, CheckSensor() is required to allow an operator to monitor the temperature in different locations. In the factory: • the temperature is measur…

2018 May-June · Paper 31 · Q4(a)(iii)

Programming basics · 2 marks · official answer ready

(iii) Draw loop(s) around appropriate group(s) of 1s to produce an optimal sum-of-products for the table in part (a)(ii). [2]

2018 May-June · Paper 31 · Q4(a)(iv)

Programming basics · 2 marks · official answer ready

(iv) Write the simplified sum-of-products expression for your answer to part (a)(iii). X = ........................................................................................…

2018 May-June · Paper 31 · Q4(b)(ii)

Programming basics · 2 marks · official answer ready

(ii) Draw loop(s) around appropriate group(s) of 1s to produce an optimal sum-of-products for the table in part (b)(i). [2]

2018 May-June · Paper 31 · Q4(b)(iii)

Programming basics · 2 marks · official answer ready

(iii) Write the simplified sum-of-products expression for your answer to part (b)(ii). X = ........................................................................................…

2018 May-June · Paper 31 · Q5(a)(i)

Programming basics · 1 mark · official answer ready

(i) xy = xy ^ c4 Reason .............................................................................................................................. ............................…

2018 May-June · Paper 31 · Q5(a)(ii)

Programming basics · 1 mark · official answer ready

(ii) zy = zy \ 10 Reason .............................................................................................................................. ...........................…

2018 May-June · Paper 31 · Q5(a)(iii)

Programming basics · 1 mark · official answer ready

(iii) yy := xz ^ − 6 Reason .............................................................................................................................. ........................…

2018 May-June · Paper 31 · Q5(b)

Programming basics · 4 marks · official answer ready

(b) Complete the Backus-Naur Form (BNF) for the syntax diagrams on the opposite page. ::= .........................................................................................…