Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

iGCSE Computer Science: Boolean Logic

Total questions: 20

Worksheet time: 12mins

Name
Class
Date
1.

Choose all the Boolean logic gates ...

a)

NOT

b)

AND

c)

BUT

d)

XOR

2.

Truth table for AND gate?

a)
b)
c)
d)
3.

Truth table for OR gate?

a)
b)
c)
d)
4.

Which logic gate is this truth table for?

a)

AND

b)

OR

c)

NOR

d)

XOR

5.

Which of these programming constructs make use of Boolean logic?

a)

if ... then ...

b)

while ... do ....

c)

repeat ... until ....

d)

repeat n times ....

6.

Which of these statements is NOT a Boolean statement?

a)

Donald Trump is the US President

b)

2 + 2 = 5

c)

Earth is the only planet with life in the Universe

d)

There are more than 15 million people in the Netherlands

7.

If x = 3 and y = 5, choose all the statements that evaluate to True.

a)

x < y

b)

y > x**2

c)

2 * x == y

d)

y % x == 3

8.

What is the correct order of precedence for logical operations?

a)

(brackets) NOT AND OR

b)

(brackets) NOT OR AND

c)

(brackets) OR AND NOT

d)

NOT (brackets) OR AND

9.

If a = 10 and b = 5 which of these Boolean expressions are True?

a)

a > b And a == 2 * b

b)

b > a And b == a / 3

c)

a < b And b = a / 2

d)

a == 2 * b And a**2 == b*20

10.

Evaluate: 2 < 3 And ( Not 3 > 2)

a)

True

b)

False

11.

Result of this Boolean expression?

a)

True

b)

False

12.

Which word best completes this sentence:


Data that is Boolean can only take two values: True _____ False.

a)

and

b)

or

c)

not

13.

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.

a)

output

b)

result

c)

data

d)

processing

14.

Which word best completes this sentence?


A combination of logic gates is known as a logic _______.

a)

circuit

b)

program

c)

array

d)

truth table

15.

Output for input of 150?

a)

Discount of 10% is 15.0

b)

Discount of 5% is 7.5

c)

No discount

d)

Invalid input

16.

Output for input of ""?

a)

Invalid password

b)

Password is too short

c)

Password is too long

d)

Password is Ok

17.

Output for inputs of 750 and 22900

a)

Sufficient profit made this week

b)

Income in line with attendance this week

c)

Attendance is very low this week

d)

Possible accounting error

18.

Inputs for output of "Sufficient profit made this week"

a)

income = 4501, attendance = 499

b)

income = 2500, attendance = 22500

c)

income = 1000, attendance = 1000

d)

income = 500, attendance = 2500

19.

A logic gate that outputs True only if both its inputs are also True?

a)

OR

b)

AND

c)

XOR

d)

NAND

20.

Which logic gate is the odd one out and for which reason?

a)

OR - because it's more likely to output True

b)

AND - because it has more than two inputs

c)

XOR - because the probability of it outputting True or False is equally likely

d)

NAND - because it is the inverse of AND