Logic gates
About this lesson: Logic gates
In short
A logic gate is a tiny circuit that takes binary inputs and gives one output. The NOT gate has one input and gives the opposite. Switch the input on and off.

What you'll explore
- NOT gate: Flip the input
- A logic gate is a tiny circuit that takes binary inputs and gives one output. The NOT gate has one input and gives the opposite. Switch the input on and off.
- AND gate: Both inputs must be 1
- An AND gate outputs 1 only if input A and input B are both 1. Try all four combinations and watch the matching row light up in the truth table.
- OR gate: One input is enough
- An OR gate outputs 1 if A or B (or both) is 1. It only outputs 0 when both inputs are 0. Try all four rows again.
- Real circuits: Switches as gates
- Two switches in a line light the bulb only if both are closed: AND. Side by side, either switch works: OR. Try both layouts.
- Check yourself: Complete the row
- An OR gate has input A = 0 and input B = 1.
Also in this lesson
- Common mix-ups
- All three gates
- Gates in real life
- Gate game
Words to know
- logic gate
- A tiny circuit that gives an output from binary inputs.
- input
- A 0 or 1 going into a gate.
- output
- The 0 or 1 a gate gives out.
- truth table
- A table of every input combination and its output.
- series
- One after another in a single path.
- parallel
- Side by side, giving more than one path.
Sources
- BBC Bitesize GCSE Computer Science: Logic gates