Boolean logic – IGCSE Computer Science (0478)

75 questions · page 1 of 5

0 / 0Answer a question to start your score.
Quick quiz (10)Saved 0
Advertisement
1
0478/21/M/J/26 · Question 8May/June 2026Paper 217 marks
Loading question…
Question text

8
Consider the logic circuit:
A
B
X
C
(a) Write the logic expression for the given logic circuit.
…
… [3]
(b) Complete the truth table for the given logic circuit.
working space
A
B
C
X
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
[4]
© Cambridge University Press & Assessment 2026

2
0478/22/M/J/26 · Question 8May/June 2026Paper 229 marks
Loading question…
Question text

8
Consider the logic expression:
Z = NOT (B OR NOT C) XOR (A NAND C)
(a) Draw a logic circuit for this logic expression.
Each logic gate must have a maximum of two inputs.
Do not simplify the logic expression.
A
B
Z
C
[5]
(b) Complete the truth table from the given logic expression.
working space
A
B
C
Z
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
[4]
© Cambridge University Press & Assessment 2026
ĬÓĊ®Ġ´íÈõÏĪÅĊßú·þ×

3
0478/23/M/J/26 · Question 7May/June 2026Paper 238 marks
Loading question…
Question text

7
Consider the logic expression:
X is 1 if (P = NOT 1 AND Q = 1) XOR (Q = 1 NOR R = 1)
(a) Draw a logic circuit for the given logic expression.
Each logic gate must have a maximum of two inputs.
Do not simplify this logic expression.
P
Q
X
R
[4]
(b) Complete the truth table from the given logic expression.
working space
P
Q
R
X
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
[4]
© Cambridge University Press & Assessment 2026

Advertisement
4
0478/22/F/M/26 · Question 7Feb/March 2026Paper 228 marks
Loading question…
Question text

7
Consider the logic expression:
X = (A NAND NOT B) XOR (A NOR C)
(a) Draw a logic circuit for this logic expression.
Each logic gate must have a maximum of two inputs.
Do not simplify the logic expression.
A
B
X
C
[4]
(b) Complete the truth table from the given logic expression.
working space
A
B
C
X
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
[4]
© Cambridge University Press & Assessment 2026

5
0478/21/O/N/25 · Question 4Oct/Nov 2025Paper 2114 marks
Loading question…
Question text

4
(a) A restaurant offers a fixed priced menu. A meal for an adult costs $9.99 and a meal for a child
costs $6.99.
If there are 6 or more people at a table, a 15% discount is applied to the total cost of the
order.
Write an algorithm in pseudocode to:
•
input the number of adults and the number of children at a table
•
calculate the total cost of the order with the discount, if this applies
•
output the final cost of the order.
…
…
…
…
…
…
…
…
…
…
…
…
…
… [5]
(b) The final cost of the order after the discount may have more than 2 decimal places.
Write a pseudocode statement to set the final cost of the order to 2 decimal places.
You do not need to rewrite the whole algorithm.
…
… [2]
Ĭ×Ċ®Ġ´íÈõÏĪÅĊÝü¸þ×
,
,
(c) The restaurant offers a discount on a meal if the person ordering is either a student or is 65
years or older. The discount (X = 1) can only be given if the amount of the order is $20.00 or
over.
a student
0
rule A
not a student
1
under 65 years old
0
rule B
65 years or older
1
under $20.00
0
rule C
$20.00 or over
1
(i)
Write the logic expression for this problem.
… [2]
(ii)
Draw a logic circuit for this logic expression.
Each logic gate must have a maximum of two inputs.
Do not simplify this logic expression.
A
B
X
C
[3]
(d) Draw the NAND logic gate symbol and complete the truth table for it.
NAND logic gate symbol:
Truth table:
A
B
X
0
0
0
1
1
0
1
1
[2]
ĬÕĊ®Ġ´íÈõÏĪÅĊßú¸Ā×

6
0478/22/O/N/25 · Question 6Oct/Nov 2025Paper 228 marks
Loading question…
Question text

6
Consider the logic expression:
X = (J XOR NOT K) NAND NOT L
(a) Draw a logic circuit for the logic expression.
Each logic gate must have a maximum of two inputs.
Do not simplify the logic expression.
J
K
X
L
[4]
(b) Complete the truth table for the given logic expression.
Working space
J
K
L
X
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
[4]
ĬÓĊ®Ġ´íÈõÏĪÅĊßú¶Ā×

7
0478/23/O/N/25 · Question 4Oct/Nov 2025Paper 2314 marks
Loading question…
Question text

4
(a) Tickets for a theme park are booked online. An adult ticket costs $12.99 and a child ticket
costs $7.99. A booking fee of $1.99 is added to the total cost of each booking.
Write an algorithm in pseudocode to:
•
input the number of adult tickets for a booking
•
input the number of child tickets for a booking
•
calculate and output the total cost of the booking using an appropriate message.
…
…
…
…
…
…
…
… [4]
(b) Each booking must have at least one adult ticket.
Explain how the algorithm could be changed to repeatedly ask for the number of adult tickets
if the number input is less than 1.
Any code used must be fully explained.
…
…
…
…
…
…
…
… [4]
ĬÏĊ®Ġ´íÈõÏĪÅĊàü¸þ×
,
,
(c) The theme park has rules for a person to be able to go on a ride.
A person can go on a ride (X = 1) only if they:
•
are 1.4 metres tall or over
•
are 12 years old or over
•
do not have a medical condition.
Input
Description
Binary value
under 1.4 metres
0
A
1.4 metres or over
1
under 12 years old
0
B
12 years old or over
1
does not have a medical condition
0
C
has a medical condition
1
(i)
Write the logic expression for this problem.
X = … [2]
(ii)
Complete the truth table for this problem.
Working space
A
B
C
X
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
[4]
ĬÍĊ®Ġ´íÈõÏĪÅĊÞú¸Ā×

8
0478/21/M/J/25 · Question 7May/June 2025Paper 218 marks
Loading question…
Question text

7
Consider the logic expression:
X = (A AND B) XOR (B OR NOT C)
(a) Draw a logic circuit for this logic expression.
Each logic gate must have a maximum of two inputs.
Do not simplify the logic expression.
A
B
X
C
[4]
(b) Complete the truth table for the given logic expression.
Working space
A
B
C
X
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
[4]
ĬÓĊ®Ġ´íÈõÏĪÅĊàù¶þ×

Advertisement
9
0478/22/M/J/25 · Question 8May/June 2025Paper 228 marks
Loading question…
Question text

8
(a) Draw the symbol for an XOR logic gate and complete the truth table for it.
XOR logic gate symbol:
Truth table:
A
B
X
0
0
0
1
1
0
1
1
[2]
ĬÑĊ®Ġ´íÈõÏĪÅĊßù·þ×
,
,
(b) Consider the logic rules in the following table:
Input
Binary value
Description
0
operator not present
A
1
operator present
0
ignition key present
B
1
ignition key not present
0
operator code correct
C
1
operator code not correct
A crane is a machine with a long arm used to lift heavy objects. The crane will only move:
•
if the operator is present and
•
either the ignition key is present, or the operator code is correct.
The crane moving is represented by X = 1.
(i)
Write the logic expression for the crane moving.
X = … [2]
(ii)
Complete the truth table for the crane moving.
Working space
A
B
C
X
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
[4]
ĬÓĊ®Ġ´íÈõÏĪÅĊßû·þ×

10
0478/23/M/J/25 · Question 7May/June 2025Paper 238 marks
Loading question…
Question text

7
(a) Draw the symbol for a NOR logic gate and complete the truth table for it.
NOR logic gate symbol:
Truth table:
A
B
Z
0
0
0
1
1
0
1
1
[2]
(b) Consider the rules given in the following table:
Input
Binary value
Description
0
dark
L
1
light
0
no motion detected
M
1
motion detected
0
no sound detected
S
1
sound detected
A security system uses sensors to sound an alarm if an intruder is detected.
The alarm sounding is represented by the output A = 1.
The alarm sounds if it is dark and if either motion or sound or both motion and sound are
detected.
ĬÑĊ®Ġ´íÈõÏĪÅĊÝú¸þ×
,
,
(i)
Write the logic expression for the security system.
A = …
… [2]
(ii)
Complete the truth table for the security system.
Working space
L
M
S
A
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
[4]
ĬÓĊ®Ġ´íÈõÏĪÅĊÝü¸þ×

11
0478/22/F/M/25 · Question 9Feb/March 2025Paper 229 marks
Loading question…
Question text

9
Consider this logic expression:
Z = (A NAND B) XOR (NOT (NOT B NAND C))
(a) Draw a logic circuit for this logic expression.
Each logic gate must have a maximum of two inputs.
Do not simplify the logic expression.
A
B
Z
C
[5]
(b) Complete the truth table from the given logic expression.
Working space
A
B
C
Z
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
[4]
ĬÑĊ®Ġ´íÈõÏĪÅĊßù·þ×

12
0478/21/O/N/24 · Question 2Oct/Nov 2024Paper 211 marks
Loading question…
Question text

2
Tick (✓) one box to identify which option is used to show the inputs and output of a Boolean
expression.
A
flowchart
B
trace table
C
truth table
D
variable
[1]

13
0478/21/O/N/24 · Question 7Oct/Nov 2024Paper 217 marks
Loading question…
Question text

7
Consider the logic circuit:
X
W
Y
Z
(a) Write a logic expression for the given logic circuit. Do not attempt to simplify the logic
expression.
W = …
… [3]
(b) Complete the truth table from the given logic circuit.
Working space
X
Y
Z
W
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
[4]
ĬÏĊ®Ġ´íÈõÏĪÅĊÝü¸Ā×

Advertisement
14
0478/22/O/N/24 · Question 9Oct/Nov 2024Paper 228 marks
Loading question…
Question text

9
Consider the logic expression:
X = (NOT P OR Q) NAND (Q XOR R)
(a) Draw a logic circuit for this logic expression.
Each logic gate must have a maximum of two inputs.
Do not simplify the logic expression.
P
Q
X
R
[4]
(b) Complete the truth table for the given logic expression.
Working space
P
Q
R
X
0
0
0
0
0
1
0
1
0
0
1
1
1
0
0
1
0
1
1
1
0
1
1
1
[4]
ĬÑĊ®Ġ´íÈõÏĪÅĊàû¶Ā×

15
0478/23/O/N/24 · Question 3Oct/Nov 2024Paper 234 marks
Loading question…
Question text

3
Four logic gates and five logic gate symbols are shown.
Draw one line to link each logic gate to its correct symbol. Not all logic gate symbols will be used.
Logic gate symbol
Logic gate
AND
NAND
NOR
XOR
[4]
ĬÍĊ®Ġ´íÈõÏĪÅĊàû¸þ×

Advertisement