KS3 · Computer Science

Boolean logic: AND, OR, NOT

Every decision your computer makes boils down to true or false, and three tiny words do all the deciding.

Boolean logic · AND and OR

Doors that decide

Every situation below has two inputs, and each one is either true or false. Call the first input A and the second input B. The automatic doors open when motion AND activated are true; the double doors are open when left OR right is open. For each situation, tick what is true: A AND B, A OR B, both, or neither.

  • A A AND B is true
  • B A OR B is true
  1. Automatic doors: someone walks up (motion true) and the doors are switched on (activated true)
  2. Automatic doors: someone walks up (motion true) but the doors are switched off (activated false)
  3. Double doors: left door open (true), right door shut (false)
  4. Double doors: left door shut (false), right door open (true)
  5. Double doors: left door open (true), right door open (true)
  6. Automatic doors: nobody there (motion false) and the doors are switched off (activated false)

Check your thinking

What is 1 OR 1?

In Boolean logic, 1 is a short way of writing true and 0 is a short way of writing false. Here A = 1 and B = 1.

What is A OR B? Pick the idea closest to what you think right now.
How sure are you?

Predict, then check

In a switch circuit, a switch that is on stands for true (1) and a switch that is off stands for false (0).

Circuit 1 has two switches in a line. Circuit 2 has two switches side by side, in parallel. In both circuits, switch 1 is on and switch 2 is off. What happens?

Computer Science · Logic gates

Three gates, three rules

A logic gate is an electronic device that performs Boolean logic: it takes binary inputs and gives a single binary output. Gates are the basic building blocks of digital circuits. Step through each row, and say the output out loud before you read it.

Where it came from

Which came first: the logic or the computer?

When it happened: put the earliest first

1 · Earliest4 · Most recent
  1. Computer processors contain billions of tiny logic gates

  2. Someone proves that circuits with switches can do Boolean logic

  3. George Boole is born

  4. Boolean logic is introduced

Put it all together

In your own words

Describe how a computer uses Boolean logic and logic gates to make decisions. [4 marks]

0 words · your answer stays on this page and is not sent anywhere.

WHAT YOU'VE LEARNED

A quick recap of today's lesson.

How a computer makes every decision with nothing but true and false.

What you need to know

  • Boolean means an expression that is either true or false. True is often written as 1 and false as 0, the same two values used in binary.
  • AND is true only when all its inputs are true. OR is true when at least one input is true, and that includes both. NOT reverses a value: true becomes false and false becomes true.
  • A logic gate is an electronic device that takes one or more binary inputs and gives a single binary output. AND and OR gates have two inputs; a NOT gate has one.
  • Logic gates are combined into circuits so computers can make decisions and run programs. Modern processors contain billions of them.

The big picture

Boolean logic is about making decisions with just two values: true (often written 1) and false (often written 0). Three operators do the work: AND is true only when all its inputs are true, OR is true when at least one input is true (including both), and NOT flips a value to its opposite. Inside a computer these operators are built as logic gates, small electronic devices that take binary inputs and give a single binary output. Gates are combined into circuits, and a modern processor contains billions of them, which is how a computer makes its decisions.

Key points

1Boolean logic is about true and false, not numbers: 1 OR 1 is 1, never 2.
2AND needs every input true. OR needs at least one. NOT gives the opposite.
3Whenever A AND B is true, A OR B is true as well.
4Gate symbols: AND is half square, half semicircle; OR is an arrowhead; NOT is a triangle with a small circle.
5A truth table lists every possible input and the output the gate gives for each one.
6Boole introduced Boolean logic in 1847; in 1940 Shannon proved that switch circuits can carry it out.

Worked example

Problem

A logic gate is drawn with a flat back and a rounded front: half square, half semicircle. Its two inputs are 1 and 0. Which gate is it, and what is its output?

⚠ Watch out

Reading OR as 'one or the other, but not both'. In Boolean logic, A OR B is also true when A and B are both true.

🧠

Memory hook

AND is fussy: everyone has to say yes. OR is easy-going: one yes is enough, and two yeses are fine too. NOT is contrary: whatever you say, it says the opposite.

✓

Check yourself

Can you find a pair of inputs where A AND B and A OR B give different answers? Now find one where they give the same answer. How many of each can you find?

Flashcards

(15)
What does Boolean mean?
Describing an expression that is either true or false. Boolean logic is about making decisions with true and false values, not about numbers.
What are the only two values in Boolean logic, and how are they often written?
True, often written as 1, and false, often written as 0. These are the same two values used in binary.
When is A AND B true?
Only when A and B are both true. If even one input is false, A AND B is false.
When is A OR B true?
When at least one of A or B is true, and that includes when both are true. It is false only when both are false.
What does NOT do?
It reverses a value: NOT true is false, and NOT false is true.
How is a logical operation different from an arithmetic one?
Arithmetic, such as addition, works on numbers and gives a number. A logical operation works on true/false statements and always gives true or false.
What is a logic gate?
An electronic device that performs Boolean logic: it takes one or more binary inputs and gives a single binary output. Logic gates are the basic building blocks of digital circuits.
Describe the symbol for an AND gate.
A half square, half semicircle shape, with two inputs and one output.
Which gate is drawn as an arrowhead, and how many inputs does it have?
The OR gate. It has two inputs and one output.
Which gate's symbol ends in a small circle?
The NOT gate: a triangle followed by a small circle, with one input and one output.
What is a truth table?
A chart showing all the possible ways a statement can be true or false; for a gate, it shows the output for every possible input.
Who was George Boole?
An English mathematician and logician, born in 1815, who introduced Boolean logic in 1847. His work became a building block of modern computing, though he never used a computer.
What did Claude Shannon prove in 1940?
That Boolean logic expressions and electrical circuits with switches are equivalent: an off switch stands for false (0) and an on switch for true (1).
How can switches show AND and OR?
AND: two switches in a line, so the circuit is on only when both are on. OR: two switches in parallel, so the circuit is on when one or both are on.
How do logic gates let a computer make decisions?
Gates are combined into circuits that can make more complex decisions, such as working out the winner of rock, paper, scissors. A processor contains billions of gates working together at incredible speed.

Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.

Learning with Lightbulb is opening soon

You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.

Keep me posted

More KS3 Computer Science topics

See the full KS3 Computer Science curriculum →

How this lesson was checked. This KS3 Computer Sciencelesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 2 October 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.