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

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

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

Official answer for Question 3

Part (b)

Part (b)

IF InA = TRUE AND InB = TRUE

✓
THEN
✓
OutZ FALSE
✓
ELSE
✓
OutZ TRUE
✓
ENDIF
✓
Mark as follows
✓
Structure: IF – THEN - ELSE – ENDIF
[1]
✓
Condition: InA = TRUE AND InB = TRUE
[1]
✓
OutZ FALSE (when condition true)
✓
Logic:
✓
OutZ TRUE (when condition false)
[1]
✓
Alternative answer (worth 3 marks):
✓
OutZ NOT(InA AND InB)
✓
OutZ NOT InA OR NOT InB
✓
Mark Scheme
✓
Syllabus
✓
Paper
✓
Cambridge International AS/A Level – October/November 2015
✓
9608

Question 21

Mark scheme 9608_w15_ms_21.pdf →

Show text version of question

Question 3

Part (b)

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 (b)

The selection statement (lines 03 – 08) could have been written with more simplified logic.

Rewrite this section of the algorithm in pseudocode. ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ................................................................................................................................................... ...............................................................................................................................................[3]

Question 6

Topic relevance

Why this question appears here

82% 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