11.1 Programming basics
54 questions in this subtopic. Open a question to solve it and check the official answer.
Programming basics · 7 marks · official answer ready
(ii) An experienced programmer suggests this pseudocode would be best designed as a function. Complete the re-design of the pseudocode as follows: The main program: • the user ent…
Programming basics · 8 marks · official answer ready
(i) Write the above pseudocode algorithm as program code. Visual Basic and Pascal: You should include the declaration statements for variables. Python: You should show a comment s…
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 = ...............................................................................…
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 Start 60 Variable 0.1 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 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]
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 = ...............................................................................…
Programming basics · 2 marks · official answer ready
(i) Describe two methods of preventing accidental loss of data. 1 .................................................................................................................…
Programming basics · 2 marks · official answer ready
(i) Describe two methods of preventing accidental loss of data. 1 .................................................................................................................…
Programming basics · 3 marks · official answer ready
1 A marathon runner records their time for a race in hours, minutes and seconds. An algorithm is shown below in structured English. INPUT race time as hours, minutes and seconds C…
Programming basics · 1 mark
1 A marathon runner records their time for a race in hours, minutes and seconds. An algorithm is shown below in structured English. INPUT race time as hours, minutes and seconds C…
