Question 3(a) 2015 · October-November · Paper 23 · 0 marks
Reveal official mark-scheme answer
Official answer for Question 3
Part (a)
Part (a)
Question 1
Question 2
Question 3
Question 4
Show text version of question
Question 3
Part (a)
Question 3
A program is to simulate the operation of a particular type of logic gate.
- The gate has two inputs (TRUE or FALSE) which are entered by the user.
- The program will display the output (TRUE or FALSE) from the gate.
The program uses the following identifiers in the pseudocode below:
Identifier Data type Description InA BOOLEAN Input signal InB BOOLEAN Input signal OutZ BOOLEAN Output signal
01 INPUT InA 02 INPUT InB 03 IF (InA = FALSE AND InB = FALSE) OR (InA = FALSE AND InB = TRUE) OR (InA = TRUE AND InB = FALSE) 04 THEN 05 OutZ ← TRUE 06 ELSE 07 OutZ ← FALSE 08 ENDIF 09 OUTPUT OutZ
Part (a)
The programmer chooses the following four test cases.
Show the output (OutZ) expected for each test case.
Input Output Test case InA InB OutZ
1 TRUE TRUE
2 TRUE FALSE
3 FALSE TRUE
Why this question appears here
72% assigned-topic match · Hardware › Logic gates and logic circuits
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9608_w15_qp_23.pdf
