Skip to content
Educator
KS3 Computer Science

Boolean Logic

36 questions4 subtopics
Practise all 36 questions free →

What's covered

AND, OR, NOT — Meaning10
Truth Tables10
Boolean Logic in Programming8
Logic Gates and Circuits8

Key facts

1

AND, OR, NOT — Meaning

An AND gate's output is true only when both inputs are true.

2

Boolean Logic in Programming

IF age >= 18 AND has_ticket runs the body only when both conditions are true.

3

Logic Gates and Circuits

An AND gate outputs 1 only when all inputs are 1.

4

Truth Tables

For A=1, B=0, the value of A AND (NOT B) is 1 AND 1 = 1 (true).

5

AND, OR, NOT — Meaning

true AND (false OR true) = true AND true = true.

6

Boolean Logic in Programming

With x = 5, the expression (x > 0) and (x < 10) evaluates to true (both conditions hold).

7

Logic Gates and Circuits

A logic gate is a piece of hardware that performs a Boolean operation on its input(s).

8

Truth Tables

When both inputs of AND are 1, the output is 1 (true).

9

AND, OR, NOT — Meaning

true AND false = false.

10

Boolean Logic in Programming

Booleans are used in IF statements — the condition is evaluated as either true or false.

Sample questions

A taste of the 36 questions in this topic, answers marked. Sign up to practise the full set with spaced repetition.

1AND, OR, NOT — Meaning

When is an AND gate's output true?

  • •When at least one input is true
  • ✓When both inputs are true
  • •When neither input is true
  • •When the inputs are different values
2Boolean Logic in Programming

How are Booleans used in IF statements?

  • ✓Conditions evaluate true or false
  • •Functions return integer values only
  • •Loops count how many times code runs
  • •Variables store numbers as text strings
3Logic Gates and Circuits

What is a logic gate?

  • •A circuit that converts analogue signals to digital
  • •A memory chip storing binary values
  • ✓Hardware doing a Boolean operation
  • •Software that filters network traffic
4Truth Tables

Rows in an AND truth table with two inputs?

  • •Eight rows in total
  • ✓Four rows in total
  • •Six rows in total
  • •Two rows in total
5AND, OR, NOT — Meaning

When is an OR gate's output true?

  • •Only when both inputs are false
  • •Only when both inputs are true
  • ✓When any input is true
  • •When the two inputs have opposite values
6Boolean Logic in Programming

IF age >= 18 AND has_ticket — when does it run?

  • ✓Only when both are true
  • •When either is true (one needed)
  • •When neither is true (zero needed)
  • •When the age is below 18 only

Try it for four weeks. Free.

One school. Unlimited classes. No card limit. No teacher limit. If your students aren't practising daily by the end of the trial, you owe us nothing.

More KS3 Computer Science topics

📖 All KS3 Computer Science key terms & vocabulary →