🎓 Prepared by students from Boğaziçi University

What are Logic Gates?

Logic gates are the basic building blocks of digital electronics, taking one or more binary inputs (0 or 1) and producing a single binary output according to a fixed rule. Combining gates like AND, OR, NOT and XOR lets engineers build everything from a calculator to a CPU.

Short answer

A logic gate is a digital circuit that performs a single Boolean logic operation (AND, OR, NOT, XOR, etc.) on one or more binary inputs to produce one binary output, defined by its truth table.

AND gate vs OR gate
AND gate (A·B)
  • Output is 1 only when BOTH inputs are 1
  • Truth table: 0,0→0 · 0,1→0 · 1,0→0 · 1,1→1
  • Symbol: flat-back D shape
  • Used for: enabling a signal only when all conditions are true
OR gate (A+B)
  • Output is 1 when AT LEAST ONE input is 1
  • Truth table: 0,0→0 · 0,1→1 · 1,0→1 · 1,1→1
  • Symbol: curved-back shield shape
  • Used for: triggering an action when any condition is true
01

Try it: interactive calculator

AND gate output Y
0
= 1*0
02

Step-by-step worked examples

An AND gate has inputs A=1 and B=1. What is the output Y?

AND rule: Y = A · B (1 only if both inputs are 1)
A=1, B=1 → Y = 1×1 = 1
Output Y = 1

An OR gate has inputs A=0 and B=1. What is the output Y?

OR rule: Y = A + B, output 1 if at least one input is 1
A=0, B=1 → at least one input is 1
Output Y = 1

A NOT gate (inverter) receives input A=1. What is the output Y?

NOT rule: Y = Ā (flips the input)
A = 1 → flip to 0
Output Y = 0
03

Flashcards

04

Quick quiz

Q1.What is the output of an AND gate when A=1 and B=0?

Correct answer: B. AND requires ALL inputs to be 1; since B=0, output is 0.

Q2.Which gate outputs 1 whenever at least one input is 1?

Correct answer: C. OR outputs 1 if any input is 1.

Q3.What does a NOT gate do to a single input of 0?

Correct answer: B. NOT inverts the input, so 0 becomes 1.

Q4.Which gate is called 'universal' because any Boolean function can be built from it alone?

Correct answer: C. NAND (and NOR) are functionally complete — any logic circuit can be built using only NAND gates.
📄Download this topic as a printable worksheet (PDF)Summary + 10 questions + answer key — print it, share it in class.
Study better with Bounlu apps
Notek
Notek

The full card deck, worked steps and AI-tutor support for “What are Logic Gates?” are in Notek — study by hand before your exam.

Get it free
Notek 1Notek 2Notek 3Notek 4Notek 5
05

Common mistakes

Thinking OR requires both inputs to be true, like AND.Correct: OR only needs ONE input to be true; AND needs ALL inputs true.

Confusing XOR with OR.Correct: XOR is true only when inputs DIFFER; OR is true when at least one is true (including both true).

Believing NOT can take two inputs.Correct: NOT is a unary gate — it only ever has ONE input.

Assuming NAND is just 'not AND is useless'.Correct: NAND is a universal gate — every other logic gate can be constructed from NAND gates alone.

06

FAQ

What are logic gates?

Logic gates are digital circuits that perform basic Boolean operations (AND, OR, NOT, XOR, NAND, NOR) on binary inputs to produce a binary output.

What is the truth table of an AND gate?

0,0→0; 0,1→0; 1,0→0; 1,1→1 — the AND gate only outputs 1 when every input is 1.

How do you calculate a logic gate's output?

Apply the gate's Boolean rule to its inputs: AND multiplies (all must be 1), OR is true if any input is 1, NOT flips a single input, XOR is true only when inputs differ.

What are examples of logic gates in real devices?

CPUs, calculators, memory chips and traffic-light controllers are all built from combinations of AND, OR, NOT, XOR, NAND and NOR gates.

Related topics