KS3 · Computer Science
Boolean logic: AND, OR, NOT
Every decision your computer makes comes down to true or false, and three tiny words do all the deciding: AND, OR and NOT.
Predict, then check
In a switch circuit, a switch that's on stands for true (1) and a switch that's 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. Which circuits are on?
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.
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 describes an expression that is either true or false. Boolean logic is about making decisions, not about numbers.
- There are only ever two values: true, often written 1, and false, often written 0. Binary uses the same two.
- Addition works on numbers and gives a number. A logical operation works on true/false statements and always gives true or false.
Have a goYour friend is doing a logic puzzle, writes true + true = 2, and looks very pleased with themselves. What's gone wrong?
true and true aren't amounts, so the result can't be 2.
A logical operation works on true/false values and only ever gives true or false; adding is for numbers, so a total like 2 can't be a logical result.
- AND is true only when all its inputs are true. One false input is enough to make it false.
Have a goA game says: level_up = enough_points AND boss_beaten. You've got enough points but haven't beaten the boss yet. Do you level up?
No: level_up is false.
AND needs every input to be true. Having one of the two isn't 'nearly' enough: a single false input makes AND false.
- OR is true when at least one input is true, and that includes when both are true.
- NOT reverses a value: NOT true is false, and NOT false is true.
Have a goA porch light follows light_on = NOT daytime. It's the middle of the day. Is light_on true or false?
False: the light stays off.
daytime is true, and NOT flips it to false. The trap is copying the input straight across instead of reversing it.
- A logic gate is an electronic device taking one or more binary inputs and giving a single binary output.
- AND and OR gates have two inputs. A NOT gate has just one. Every gate has one output.
- A truth table shows exactly what a gate outputs for every possible input.
- 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 decisions, not numbers. There are only two values: true (usually written 1) and false (usually 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, and that includes both. 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. That's how a computer makes its decisions.
Key points
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'. That's how we often use 'or' in everyday talk, which is exactly why it's tempting. 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?
What are the only two values in Boolean logic, and how are they often written?
When is A AND B true?
When is A OR B true?
What does NOT do?
How is a logical operation different from an arithmetic one?
What is a logic gate?
Describe the symbol for an AND gate.
Which gate is drawn as an arrowhead, and how many inputs does it have?
Which gate's symbol ends in a small circle?
What is a truth table?
Who was George Boole?
What did Claude Shannon prove in 1940?
How can switches show AND and OR?
How do logic gates let a computer make decisions?
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 postedMore KS3 Computer Science topics
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 30 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.