Why logic gates are exam gold
Class 12 Semiconductors closes with logic gates — and this is where the chapter pays off. The questions are short, scoring, and almost always direct truth-table or boolean-algebra problems. CBSE typically asks one 2-mark or 3-mark question on logic gates every board exam. JEE Main and NEET treat them as easy MCQs.
We will work through every gate, what its truth table looks like, how to combine gates to make new ones, and the kind of trap questions examiners reuse.
The good news: the entire topic has only seven gates and three rules. Learn them once and you score 100% in this section forever.
Key Terms & Definitions
Logic gate — an electronic circuit that produces a single binary output (0 or 1) for a given combination of binary inputs.
Truth table — a list of all possible input combinations and the corresponding outputs. For two inputs, four rows; for three inputs, eight rows.
Boolean algebra — the rules used to simplify logical expressions. Symbols: for AND, for OR, for NOT.
Universal gate — a gate from which all other gates can be built. NAND and NOR are both universal.
The Seven Gates
NOT (inverter)
One input, one output. Output is the negation of input.
| A | |
|---|---|
| 0 | 1 |
| 1 | 0 |
AND
Output is 1 only if all inputs are 1.
| A | B | A·B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
OR
Output is 1 if at least one input is 1.
| A | B | A+B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 1 |
NAND (NOT-AND)
Output is the inverse of AND. Universal gate.
| A | B | |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
NOR (NOT-OR)
Output is the inverse of OR. Universal gate.
| A | B | |
|---|---|---|
| 0 | 0 | 1 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 0 |
XOR (Exclusive OR)
Output is 1 if exactly one input is 1.
| A | B | A⊕B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
XNOR
Inverse of XOR — output is 1 when inputs match.
Building Gates from NAND
(NAND with both inputs tied)
(NAND followed by NOT-via-NAND)
(use De Morgan: each input inverted, then NAND)
This means a single type of NAND chip can implement any digital circuit. NOR can do the same. JEE often asks “express OR using only NAND” — drill the steps above.
Worked Examples
Easy (CBSE Class 12)
Example 1. Two inputs enter a NAND gate. Output?
, so . Output is 1.
Medium (JEE Main)
Example 2. Show that .
Truth table approach: tabulate for all four combinations.
| A | B | ||||
|---|---|---|---|---|---|
| 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 | 1 | 1 |
| 1 | 1 | 0 | 0 | 1 | 1 |
Columns 5 and 6 match — the identity holds.
Hard (JEE Advanced)
Example 3. A circuit takes inputs and through two NAND gates and produces output . Build the truth table and identify the gate.
| A | B | |||
|---|---|---|---|---|
| 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 1 | 0 | 0 |
| 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 0 | 0 | 0 |
This matches NOR.
Exam-Specific Tips
CBSE marking: drawing the gate symbol AND writing the truth table together earns full marks. Just one of them earns half. Always do both.
For JEE, learn De Morgan’s laws by heart: and . They appear in nearly every boolean simplification question.
NEET tends to ask “which gate gives output 1 when both inputs are 0?” Answer: NOR. Memorise the corner cases of each truth table.
Common Mistakes to Avoid
Confusing NAND and NOR. NAND is high except when both inputs are 1; NOR is high only when both inputs are 0. Different corner cases.
Forgetting that XOR is true only when inputs differ. Students sometimes treat XOR like OR.
Drawing the wrong symbol. The bubble at the output of NAND/NOR is what makes them inverted versions. Skip the bubble in a CBSE answer and you lose the mark.
Mixing up (boolean OR, gives 1 if any input is 1) with arithmetic addition (which would give 2 for ). In digital logic, .
Applying De Morgan’s law incorrectly — flipping to but forgetting to invert each individual variable. Both swaps must happen together.
Practice Questions
Q1. Truth table of .
only when . Otherwise .
Q2. Construct AND using only NOR gates.
. Use NOR on . To get via NOR: tie inputs to both pins of a NOR gate.
Q3. Output of XOR with inputs .
.
Q4. Simplify .
.
Q5. Truth table of XOR is the same as which combination?
.
Q6. Why is NAND universal?
Because NOT, AND, and OR can each be built from NAND alone.
Q7. Output of NOR with ?
.
Q8. Apply De Morgan’s law to .
.
FAQs
Q. Are logic gates only theoretical?
No — they are real silicon circuits inside every CPU. The textbook describes idealised behaviour; real gates have propagation delay and limits on input voltage.
Q. Why two universal gates (NAND and NOR)?
Either alone is enough. Engineers prefer NAND because it is slightly cheaper and faster in CMOS technology, but in board-exam terms either is fine.
Q. What is the difference between combinational and sequential circuits?
Combinational depends only on current inputs (gates we covered). Sequential includes memory — flip-flops, latches. CBSE Class 12 deals only with combinational.
Q. How do truth tables help in real design?
Designers start with the desired truth table, then use boolean simplification (Karnaugh maps, beyond syllabus) to find the smallest gate combination.
Q. Are XOR and XNOR universal?
No. They cannot independently build all other gates because they lack the ability to express AND/OR purely.