WorksheetsiGCSE Computer Science: Boolean Logic
Total questions: 20
Worksheet time: 12mins
Choose all the Boolean logic gates ...
NOT
AND
BUT
XOR
Truth table for AND gate?
Truth table for OR gate?
Which logic gate is this truth table for?
AND
OR
NOR
XOR
Which of these programming constructs make use of Boolean logic?
if ... then ...
while ... do ....
repeat ... until ....
repeat n times ....
Which of these statements is NOT a Boolean statement?
Donald Trump is the US President
2 + 2 = 5
Earth is the only planet with life in the Universe
There are more than 15 million people in the Netherlands
If x = 3 and y = 5, choose all the statements that evaluate to True.
x < y
y > x**2
2 * x == y
y % x == 3
What is the correct order of precedence for logical operations?
(brackets) NOT AND OR
(brackets) NOT OR AND
(brackets) OR AND NOT
NOT (brackets) OR AND
If a = 10 and b = 5 which of these Boolean expressions are True?
a > b And a == 2 * b
b > a And b == a / 3
a < b And b = a / 2
a == 2 * b And a**2 == b*20
Evaluate: 2 < 3 And ( Not 3 > 2)
True
False
Result of this Boolean expression?
True
False
Which word best completes this sentence:
Data that is Boolean can only take two values: True _____ False.
and
or
not
Which word best completes this sentence:
A logic gate is a tiny electronic component on a chip that has inputs and ______ to simulate a Boolean operation.
output
result
data
processing
Which word best completes this sentence?
A combination of logic gates is known as a logic _______.
circuit
program
array
truth table
Output for input of 150?
Discount of 10% is 15.0
Discount of 5% is 7.5
No discount
Invalid input
Output for input of ""?
Invalid password
Password is too short
Password is too long
Password is Ok
Output for inputs of 750 and 22900
Sufficient profit made this week
Income in line with attendance this week
Attendance is very low this week
Possible accounting error
Inputs for output of "Sufficient profit made this week"
income = 4501, attendance = 499
income = 2500, attendance = 22500
income = 1000, attendance = 1000
income = 500, attendance = 2500
A logic gate that outputs True only if both its inputs are also True?
OR
AND
XOR
NAND
Which logic gate is the odd one out and for which reason?
OR - because it's more likely to output True
AND - because it has more than two inputs
XOR - because the probability of it outputting True or False is equally likely
NAND - because it is the inverse of AND
