11.1 Programming basics
169 questions in this subtopic. Open a question to solve it and check the official answer.
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]
Programming basics · 2 marks · official answer ready
(iii) Using your answer to part (c)(ii), write a simplified sum-of-products Boolean expression. X = ...............................................................................…
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
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…
Programming basics · 3 marks · official answer ready
(iv) Write the simplified sum‑of‑products expression for your answer to part (a)(iii). X = ........................................................................................…
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]
Programming basics · 2 marks · official answer ready
(iii) Write the simplified sum‑of‑products expression for your answer to part (b)(ii). X = ........................................................................................…
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]
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…
Programming basics · 2 marks · official answer ready
(c) Describe the purpose of the statement on line 11. .............................................................................................................................…
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 ............…
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…
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]
Programming basics · 2 marks · official answer ready
(iv) Write the simplified sum-of-products expression for your answer to part (a)(iii). X = ........................................................................................…
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]
Programming basics · 2 marks · official answer ready
(iii) Write the simplified sum-of-products expression for your answer to part (b)(ii). X = ........................................................................................…
Programming basics · 1 mark · official answer ready
(i) xy = xy ^ c4 Reason .............................................................................................................................. ............................…
Programming basics · 1 mark · official answer ready
(ii) zy = zy \ 10 Reason .............................................................................................................................. ...........................…
Programming basics · 1 mark · official answer ready
(iii) yy := xz ^ − 6 Reason .............................................................................................................................. ........................…
Programming basics · 4 marks · official answer ready
(b) Complete the Backus-Naur Form (BNF) for the syntax diagrams on the opposite page. ::= .........................................................................................…
