Programming
471 questions. Open a question to solve it and check the official answer.
Programming basics · 3 marks · official answer ready
(i) Complete the Boolean function that corresponds to the following truth table. INPUT OUTPUT P Q R Z 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 1 1 0 1 1 1 1 0 0 1 1 1 1 Z = P . Q . R…
Programming basics · 4 marks · official answer ready
(i) Complete the K-map corresponding to the truth table above. PQ RS [4]
Programming basics · 2 marks · official answer ready
(ii) Draw loop(s) around appropriate groups of 1’s to produce an optimal sum-of-products. [2]
Constructs · 2 marks · official answer ready
(d) Explain the role of the low-level scheduler in a multiprogramming operating system. ...........................................................................................…
Programming basics · 3 marks · official answer ready
(a) Complete the symbol table below to show its contents after the lexical analysis stage. Token Symbol Value Type Counter 60 Variable 1.5 61 Constant [3] 5
Programming basics · 3 marks · official answer ready
(i) Complete the Boolean function that corresponds to the following truth table. INPUT OUTPUT A B C X 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 0 0 0 1 0 1 0 1 1 0 1 1 1 1 1 X = A . B . C…
Programming basics · 4 marks · official answer ready
(i) Complete the K-map corresponding to the truth table above. AB CD [4]
Programming basics · 2 marks · official answer ready
(ii) Draw loop(s) around appropriate groups of 1’s to produce an optimal sum-of-products. [2]
Programming basics · 2 marks · official answer ready
(iii) Using your answer to part (b)(ii), write the simplified sum-of-products Boolean function. X = ...............................................................................…
Constructs · 2 marks · official answer ready
(d) Explain the role of the high-level scheduler in a multiprogramming operating system. ..........................................................................................…
Constructs · 4 marks · official answer ready
(v) Write pseudocode to implement the method you described in part (b)(iv). Choose line numbers to indicate where your pseudocode should be inserted in the pseudocode of part (b)(…
Constructs · 6 marks
8 : : 0 96 0 97 0 98 0 99 [2] 15 (v) Write pseudocode to implement the method you described in part (b)(iv). Choose line numbers to indicate where your pseudocode should be insert…
Constructs · 14 marks
(c) A stock report program uses a variable of type StockItem declared as follows: DECLARE ThisStockItem : Stockitem The program reads each record in the file StockFile in turn. Th…
Constructs · 4 marks · official answer ready
(v) Write pseudocode to implement the method you described in part (b)(iv). Choose line numbers to indicate where your pseudocode should be inserted in the pseudocode of part (b)(…
Constructs · 6 marks
8 : : 0 96 0 97 0 98 0 99 [2] 15 (v) Write pseudocode to implement the method you described in part (b)(iv). Choose line numbers to indicate where your pseudocode should be insert…
Constructs · 5 marks · official answer ready
6 (a) Name the most suitable input or output device for each of the following uses. Give a different device in each case. Description of use Input or output device input of credit…
Programming basics · 2 marks · official answer ready
(i) Describe two methods of preventing accidental loss of data. 1 .................................................................................................................…
Constructs · 2 marks · official answer ready
(iii) Write the table definitions to give the database in 3NF. ....................................................................................................................…
Constructs · 5 marks · official answer ready
6 (a) Name the most suitable input or output device for each of the following uses. Give a different device in each case. Description of use Input or output device input of credit…
Programming basics · 2 marks · official answer ready
(i) Describe two methods of preventing accidental loss of data. 1 .................................................................................................................…
