←Back to Subject
Notes
Notes
Study material and explanations
Diagrams
Diagrams
Visualize concepts easily
Mnemonics
Mnemonics
Tricks to remember faster
One Night Prep
One Night Prep
Short and focused revision
Revision
Revision
Quick summary and key points
Important Questions
Important Questions
Practice most relevant questions
Notes

Logic Gates: Basic, Universal & Special Gates with Truth Tables

Study material and explanations for Unit 1

Logic Gates: Basic, Universal, and Special Gates

What is a Logic Gate? (In Simple Words)

Inside your laptop or smartphone, billions of tiny switches work together to make decisions. These basic electronic decision-makers are called Logic Gates.

  • A Logic Gate is an electronic circuit with one or more inputs (0 or 1) and produces exactly one output.
  • An input 0 means Low Voltage (0V), and 1 means High Voltage (+5V).

💡 Real-Life Indian Student Analogy:
Think of college exam eligibility:
“You need 75% attendance AND you must clear internal exams.”
Only when both conditions are true, you get the admit card. That is an AND gate!


1. The Three Basic Logic Gates

The Three Fundamental Logic Operations
AND Gate (•)
Output is 1 ONLY when ALL inputs are 1. Like two switches connected in SERIES.
OR Gate (+)
Output is 1 if AT LEAST ONE input is 1. Like two switches connected in PARALLEL.
NOT Gate (Inverter)
Output is the OPPOSITE of the input. 0 turns into 1, and 1 turns into 0.

A. The AND Gate

  • Formula: Y = A • B (or simply AB)
  • Simple Rule: Output is 1 only when both inputs A and B are 1.
  • Truth Table:
Input A Input B Output Y = A • B
0 0 0
0 1 0
1 0 0
1 1 1

B. The OR Gate

  • Formula: Y = A + B
  • Simple Rule: Output is 1 if any input (A or B or both) is 1.
  • Truth Table:
Input A Input B Output Y = A + B
0 0 0
0 1 1
1 0 1
1 1 1

C. The NOT Gate (Inverter)

  • Formula: Y = A' (or Ā)
  • Simple Rule: Has only 1 input. It flips the bit upside-down.
  • Truth Table:
Input A Output Y = A’
0 1
1 0

2. Universal Logic Gates: NAND and NOR

Why Are They Called “Universal Gates”?

A gate is called Universal because you can build any other gate (AND, OR, NOT, XOR) using only NAND gates or only NOR gates!

  • Chip factories love this because making just one type of gate in bulk saves huge manufacturing costs.

A. The NAND Gate (NOT + AND)

  • Formula: Y = (A • B)'
  • It is an AND gate with a NOT bubble at its output.
  • Simple Rule: Output is 0 only when all inputs are 1. Otherwise, it gives 1.
  • Truth Table:
Input A Input B Output Y = (A • B)’
0 0 1
0 1 1
1 0 1
1 1 0

Making Basic Gates Using Only NAND:

  1. NOT Gate: Join both inputs together: Y = (A • A)' = A'.
  2. AND Gate: Pass inputs through a NAND gate, then invert the result: Y = ((AB)')' = AB.
  3. OR Gate: Invert inputs A and B first using NAND inverters, then pass into a NAND gate: Y = (A' • B')' = A + B (by De Morgan’s Law).

B. The NOR Gate (NOT + OR)

  • Formula: Y = (A + B)'
  • It is an OR gate followed by an inversion bubble.
  • Simple Rule: Output is 1 only when both inputs are 0.
  • Truth Table:
Input A Input B Output Y = (A + B)’
0 0 1
0 1 0
1 0 0
1 1 0

3. Special Purpose Gates: XOR and XNOR

XOR and XNOR Comparison
XOR (Exclusive-OR)
Output = 1 when inputs are DIFFERENT (Odd 1s detector)
XNOR (Exclusive-NOR)
Output = 1 when inputs are THE SAME (Equivalence detector)

A. The XOR Gate (Exclusive-OR)

  • Symbol: ⊕
  • Formula: Y = A ⊕ B = A'B + AB'
  • Simple Rule: Output is 1 when inputs are different from each other.
  • Truth Table:
Input A Input B Output Y = A ⊕ B
0 0 0
0 1 1
1 0 1
1 1 0

B. The XNOR Gate (Equivalence Gate)

  • Symbol: ⊙
  • Formula: Y = (A ⊕ B)' = AB + A'B'
  • Simple Rule: Output is 1 when both inputs are the exact same (00 or 11).
  • Truth Table:
Input A Input B Output Y = (A ⊕ B)’
0 0 1
0 1 0
1 0 0
1 1 1

💡 DAVV Exam Preparation Tips

5-Mark Question: “Why are NAND and NOR gates called Universal Gates? Show how to create an OR gate using only NAND gates.”

  • Define Universal Gate: Any Boolean logic circuit can be designed using only that single gate.
  • Draw the diagram: 2 NAND gates invert A and B to give A’ and B’. These feed into a 3rd NAND gate.
  • Write the proof: Y = (A' • B')' = A'' + B'' = A + B.

10-Mark Question: “Explain all primary, universal, and special logic gates with their graphical symbols, Boolean expressions, and complete truth tables.”

  • Systematically cover all 7 gates: AND, OR, NOT, NAND, NOR, XOR, and XNOR.
  • For each gate, draw its neat logic symbol, write the Boolean equation, and draw its truth table.
  • Mention where XOR is used: Binary Adders and parity generation circuits.