LearnGates

How to learn logic gates, step by step

Logic gates are the building blocks of every computer. The good news: there are only a few of them, and each one follows a rule simple enough to fit in a small table. These lessons take you from your first gate to circuits that add numbers, remember and count, one small step at a time.

Every lesson explains one idea and ends with a challenge that you solve in GateLab, a free logic circuit simulator that runs in your browser. Your circuit is checked automatically, and you earn up to three stars for using few parts. Nothing to install, no account needed.

Start with the first challenge It shows you how to draw a wire. It takes one minute.

1. The basic gates

What each gate does, with its symbol and truth table.

2. Everything from NAND

One kind of gate is enough to build all the others.

3. Adding numbers

From adding two bits to adding whole numbers.

4. Choosing and comparing

Circuits that pick a signal, select an output or compare numbers.

5. Memory and time

Circuits that remember, and circuits that count clock pulses.

How the lessons work

Read the lesson, look at the truth table and try the inputs on the page. Then press Try the challenge: GateLab opens with the inputs and outputs already placed, and you add the gates and wires in between. Press Check to see whether your circuit is right. If you get stuck, every challenge has hints, and each lesson has a solution you can open.

Start with the very first challenge, which shows you how to draw a wire: First steps.

Questions

What is the best way to learn logic gates?

Learn the rule of each gate with its truth table, then build circuits with them yourself. Building something, even something small, makes the rules stick much better than reading alone. That is why every lesson here ends with a challenge.

Do I need to know electronics?

No. Logic gates work with only two values, 0 and 1, and you can learn them like a puzzle. Electronics explains how gates are made from transistors, but you don’t need it to design circuits.

Is it free?

Yes. The lessons and the simulator are free and work in any modern browser, at home or at school.