How to learn › Coding & Tech
Coding & Tech

How to Learn the Logic Gates

Logic gates are the building blocks of every digital circuit and processor. Each takes true/false inputs and produces a true/false output by a simple rule. Learning the gates and their truth tables is core computer science and electronics. This deck teaches them all.

There are 12 cards in the deck below. You can read through them, practise them right here with the flip-card player, and then save the deck to study properly with spaced repetition — the method that makes them stick for months, not minutes.

QUESTION
Tap the card to reveal the answer

Why the logic gates is hard to memorize (and the fix)

The gates are easy to mix up (does OR need both inputs true, or just one?), and the "N" gates (NAND, NOR) are just the opposites. Learning the base rule of each fixes it.

The fix is active recall plus spaced repetition. Instead of re-reading the list (which feels productive but barely works), you test yourself — pull each answer out of memory — and you review each card on a schedule that stretches over time. Every time you successfully recall a fact, the memory gets stronger and the next review is pushed further out. That's how you go from "I saw it once" to "I just know it."

The fastest way to learn the logic gates

  1. Break it into small batches. Learn the three basic gates first (AND, OR, NOT), then XOR, then the inverted ones (NAND, NOR).
  2. Test, don't re-read. Look at the question, say the answer out loud before flipping the card. The little struggle to recall is what builds the memory — a smooth re-read does almost nothing.
  3. Review on a schedule. Spaced repetition shows you each card right before you'd forget it. Get one right and it comes back in a few days, then a week, then a month. Miss one and it comes back sooner.
  4. Keep sessions short and daily. Five to ten minutes a day beats a two-hour cram every time. Consistency is the whole game.
Memory trick: AND needs ALL inputs true. OR needs at least ONE true. NOT flips the input. XOR = "exclusive or" = true only when inputs DIFFER.

One fact per card. NAND and NOR are just AND and OR with the output flipped ("N" for NOT). NAND is famously "universal" — you can build any gate from it.

The full deck: the Logic Gates

Here's every card in the set. Practise them above, or save the deck and let spaced repetition schedule your reviews automatically.

GateOutput rule
What does an AND gate output?True only when ALL inputs are true
What does an OR gate output?True when AT LEAST ONE input is true
What does a NOT gate do?Flips the input (inverter): true → false
What does an XOR gate output?True only when the inputs are DIFFERENT
What does a NAND gate output?The opposite of AND (false only when all inputs true)
What does a NOR gate output?The opposite of OR (true only when all inputs false)
AND of 1 and 0 = ?0 (false)
OR of 1 and 0 = ?1 (true)
XOR of 1 and 1 = ?0 (inputs are the same)
NOT of 0 = ?1 (true)
Which gate is "universal" (can build any other)?NAND (also NOR)
What values do logic gates work with?True/false (1/0)

Save this deck and actually remember it

Create a free account, keep this 12-card deck, and we'll schedule every review at the perfect moment. First deck free forever — no credit card.

Study this deck free →

FAQ: learning the logic gates

How long does it take to learn the logic gates?

Most people can lock in the logic gates within one to three weeks of short daily sessions. With spaced repetition doing 10–12 cards a day, you'll recognise them within days and recall them reliably within a couple of weeks.

What's the best way to memorize the logic gates?

Active recall plus spaced repetition. Test yourself instead of re-reading, and review on a schedule that spaces the cards out over time. Flashcards are built for exactly this — which is why the deck above is the fastest path.

Is this deck free?

Yes. You can practise all 12 cards on this page for free with no account. Sign up (also free) to save the deck and let spaced repetition schedule your reviews so it sticks long-term.

More coding & tech guides

Learn the Python BasicsLearn the JavaScript Array MethodsLearn the CSS PropertiesLearn the Linux Terminal CommandsLearn the Data StructuresLearn Binary and Hexadecimal

← All “how to learn” guides