Educator
KS3 Computer Science

Boolean Logic

42 questions4 subtopics
Practise all 42 questions free →

What's covered

AND, OR, NOT — Meaning11
Truth Tables11
Boolean Logic in Programming10
Logic Gates and Circuits10

Key facts

1

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

2

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

3

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

4

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

5

An AND gate's output is 1 only when every single input is 1.

6

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

7

An AND gate outputs true only when both inputs are true.

8

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

9

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

10

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

Sample questions

A taste of the 42 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