Past-paper question · 2015 October-November · Paper 21 · Q3(a)

Question 3(a) 2015 · October-November · Paper 21 · 0 marks

Original past-paper question for 3(A)
Original past-paper question for 3(A)
Reveal official mark-scheme answer Official mark-scheme answer for 3(A)

Official answer for Question 3

Part (a)

Part (a)

✓
Inputs
✓
Output
✓
Test Case
✓
InA
✓
InB
✓
OutZ
✓
FALSE

Question 1

✓
TRUE
✓
TRUE
[1]
✓
TRUE

Question 2

✓
TRUE
✓
FALSE
[1]
✓
TRUE

Question 3

✓
FALSE
✓
TRUE
[1]
✓
TRUE

Question 4

✓
FALSE
✓
FALSE
[1]

Mark scheme 9608_w15_ms_21.pdf →

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

Topic relevance

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_21.pdf

Keep practising this topic