Logic Gates Masterclass · Vidya720
Physics · Class 12 Semiconductor Electronics · NEET

Logic gates, from a kirana shop alarm to a NEET question

A full lesson: a cartoon movie to start, then digital signals and the OR, AND and NOT gates, NAND and NOR, Boolean rules and timing diagrams, NAND and NOR as universal gates, gate combinations to crack, NEET shortcuts, problems to solve yourself, and 12 MCQs.

NEET UG 2026 syllabus: "Logic gates (OR, AND, NOT, NAND and NOR)" · was NCERT Class 12 Part II §14.10 Digital electronics and logic gates (editions before 2023); removed from the current rationalised NCERT text · about 60 min

NEET syllabus · not in the current NCERT text: this whole lessonEnrichment (beyond both): XOR, XNOR, half-adder
Voice
About 6 minutes. The animations start by themselves as the teacher explains them. Each stage's Listen button uses the same language.

Every decision in the shop is a yes-or-no rule: 1 or 0. An OR gate says "any one is enough", an AND gate says "all of them, please", and a NOT gate says "the opposite". With NAND gates alone you can build all three.

Stage 1 · The hook (5 min)

Ramesh uncle's three rules

Level

Ramesh uncle runs the kirana shop at the corner, and Arjun is helping him wire it up. Uncle has three rules. Rule 1: at night, the bell must ring if the front shutter or the back window is opened. Rule 2: the cash locker opens only with uncle's key and aunty's key. Rule 3: the sign-board lamp is on when it is not daytime.

Each rule takes yes/no inputs and gives a yes/no output. In electronics "yes" is a high voltage, written 1, and "no" is a low voltage, written 0. A signal that has only these two levels is a digital signal (an analog signal, like a sine wave, can take any value). A circuit that applies such a rule is a logic gate, and the list of outputs for every input combination is its truth table.

Teacher says

"OR, AND, NOT are just the words you already use every day. 'Tea or coffee, either is fine.' 'Bring your admit card and your ID.' 'Do not enter.' We only write them with 1s and 0s."

Pause and predict

"For Rule 1, list all the ways the two doors can be (open or shut). In how many of them does the bell ring?"

Answer (this is the OR truth table, Stage 2)

Four combinations: both shut, only shutter open, only window open, both open. The bell rings in three of them: every case except "both shut".

Stage 2 · The concept (10 min)

OR, AND and NOT: the three basic gates

Level
NEET syllabus · not in current NCERT

Pick a gate. Tap the switches A and B on the picture (or a row of the truth table) and watch the output lamp Y. Orange wires carry 1, grey wires carry 0. Press "Auto" to step through every row.

OR gate

Y = A + B

1 when at least one input is 1. In Boolean algebra 1 + 1 = 1: the plus sign means OR, not ordinary addition.

AND gate

Y = A · B

1 only when both inputs are 1. Like two switches in series.

NOT gate

Y = Ā

One input, inverted: 0 → 1, 1 → 0. Also called an inverter.

Teacher says

"OR is a lenient teacher: one correct answer is enough. AND is a strict teacher: everything must be correct. NOT is the naughty student: always says the opposite."

Stage 3 · The law (10 min)

NAND and NOR: a NOT added at the end

Level
NEET syllabus · not in current NCERT

A NAND gate is an AND gate followed by a NOT gate; a NOR gate is an OR gate followed by a NOT gate. The small circle (bubble) at the output of a symbol means NOT. Switch on "Show inside" to see the two-gate version and the extra column in the table.

A BORANDNANDNOR
0 00011
0 11010
1 01010
1 11100
Teacher says

"To write a NAND table, write the AND column and flip every value. NAND is 0 only when both inputs are 1. NOR is 1 only when both inputs are 0."

Pause and predict

"Which gate gives 1 for exactly one input combination, and which gives 0 for exactly one combination?"

Answer

AND and NOR are 1 for exactly one row (1 1 and 0 0). OR and NAND are 0 for exactly one row (0 0 and 1 1).

Stage 4 · Maths (10 min)

Boolean rules and timing diagrams

Level
NEET syllabus · not in current NCERT

NEET often gives the inputs as waveforms and asks for the output waveform. Tap any slot of A or B to flip it, choose a gate, and the output Y is worked out slot by slot. The yellow column moves along time.

  1. OR rules

    A + 0 = A  |  A + 1 = 1  |  A + A = A  |  A + Ā = 1

    One 1 is enough to make the OR output 1.

  2. AND rules

    A · 1 = A  |  A · 0 = 0  |  A · A = A  |  A · Ā = 0

    One 0 is enough to make the AND output 0.

  3. Double NOT

    (Ā)‾ = A

    Two inverters in a row cancel.

  4. De Morgan's laws

    (A + B)‾ = Ā · B̄  |  (A · B)‾ = Ā + B̄

    "Break the bar, change the sign." These two lines explain every universal-gate trick in Stage 5.

Teacher says

"For a waveform question, never look at the whole picture at once. Cut time into slots wherever any input changes, write A and B for each slot, and apply the truth table slot by slot."

Stage 5 · The big idea (10 min)

NAND and NOR are universal gates

Level
NEET syllabus · not in current NCERT

Using only NAND gates you can build NOT, AND and OR, and so any digital circuit. The same is true for only NOR gates. Choose a build, tap the inputs, and check that the table matches the gate it imitates. The middle column shows the hidden wire inside.

NOT

join both inputs: (A · A)‾ = Ā

1 NAND (or 1 NOR, since (A + A)‾ = Ā).

AND from NAND

NAND then NAND-as-NOT

2 NAND gates: ((A · B)‾)‾ = A · B. Likewise OR = NOR followed by NOR-as-NOT.

OR from NAND

(Ā · B̄)‾ = A + B

3 NAND gates: invert both inputs, then NAND them (De Morgan). Likewise AND = NOR of Ā and B̄, 3 NOR gates.

Teacher says

"A factory can make one kind of chip, millions of times, and still build any computer. That chip is NAND. Count for NEET: NOT needs 1, AND needs 2, OR needs 3 NAND gates. For NOR, swap AND and OR."

Stage 6 · Real life (10 min)

Crack the circuit: which gate is it really?

Level
NEET syllabus · not in current NCERTXOR / XNOR: enrichment

NEET loves a small network of gates and four options. Pick a circuit, tap the four input rows, fill the table in your head, and then name the single gate it behaves like. (XOR gives 1 when the inputs differ; XNOR gives 1 when they are the same. These are beyond the NEET list, but the method is the same.)

It behaves like:

Method

label every wire, fill 4 rows

Write the intermediate outputs as columns P, Q, … and finish the table. Then match the Y column to a known gate.

Real use

alarm = OR · locker = AND · lamp = NOT

Ramesh uncle's three rules. A full adder in a calculator, the checker in a microwave door and every computer are built the same way, from millions of gates.

Stage 7 · NEET level (10 min)

Shortcuts and tricks

Level

One odd row

AND: only 11 → 1 · OR: only 00 → 0

NAND and NOR are the same with every output flipped: NAND only 11 → 0, NOR only 00 → 1.

Bubbles

bubble = NOT

A bubble at an output inverts the output; bubbles at both inputs invert the inputs. "Bubbled-input AND" = NOR, "bubbled-input OR" = NAND.

Joined inputs

NAND(A, A) = NOR(A, A) = Ā

AND(A, A) = OR(A, A) = A: just a wire.

Count the gates

NAND: NOT 1 · AND 2 · OR 3

NOR: NOT 1 · OR 2 · AND 3.

De Morgan

(A + B)‾ = Ā B̄ · (A B)‾ = Ā + B̄

NOT gates on both inputs of a NAND → OR; on both inputs of a NOR → AND.

Waveforms

slot by slot

Mark a vertical line wherever any input changes and apply the table in each slot.

Teacher says

"Never trust a circuit's looks. Two NOT gates and a NAND look complicated, but the table says OR. Fill the four rows, and the answer is sitting there."

Stage 8 · Solve it yourself

Five worked problems

Level

Cover the solution, draw the truth table, and solve on paper. Open the hint only if you are stuck for more than a minute.

Problem 1 · From expression to gate

Write the truth table of Y = (A · B)‾ and name the gate.

Hint

Write the A · B column first, then flip it.

Full solution
A B : A·B → Y
0 0 : 0 → 1
0 1 : 0 → 1
1 0 : 0 → 1
1 1 : 1 → 0
Y = 1, 1, 1, 0: a NAND gate
Problem 2 · Joined inputs

Both inputs of a NOR gate are joined and connected to A. Find Y for A = 0 and A = 1. What is the circuit?

Hint

Y = (A + A)‾ and A + A = A.

Full solution
A = 0: (0 + 0)‾ = 0‾ = 1
A = 1: (1 + 1)‾ = 1‾ = 0
Y = Ā: a NOT gate
Problem 3 · NOT gates before a NAND

A and B pass through NOT gates, and the two outputs feed a NAND gate. Find the output and name the equivalent gate.

Hint

Y = (Ā · B̄)‾. Use De Morgan, or make the table.

Full solution
Y = (Ā · B̄)‾ = (Ā)‾ + (B̄)‾ = A + B
table: 00 → 0, 01 → 1, 10 → 1, 11 → 1
OR gate
Problem 4 · A NEET-style network

A and B feed an AND gate and also a NOR gate. The outputs P (AND) and Q (NOR) feed an OR gate whose output is Y. Make the truth table of Y. For which inputs is Y = 1?

Hint

Columns: A, B, P = A·B, Q = (A + B)‾, Y = P + Q.

Full solution
0 0 : P = 0, Q = 1 → Y = 1
0 1 : P = 0, Q = 0 → Y = 0
1 0 : P = 0, Q = 0 → Y = 0
1 1 : P = 1, Q = 0 → Y = 1
Y = 1 when A = B (an XNOR, "equality" gate: enrichment)
Problem 5 · Waveforms

In four equal time slots, A = 0, 0, 1, 1 and B = 0, 1, 0, 1. Find the output sequence of (a) a NAND gate and (b) a NOR gate.

Hint

Go slot by slot. NAND is 0 only for 11; NOR is 1 only for 00.

Full solution
slots: 00, 01, 10, 11
NAND: 1, 1, 1, 0
NOR: 1, 0, 0, 0
(a) 1 1 1 0 · (b) 1 0 0 0
Stage 9 · Practice ladder

12 MCQs, from easy to NEET-level

Level

Write the truth table first, then click.

Score: 0 / 12

Stage 10 · Exam corner

How NEET asks this

If the question says…Write this firstThe trap
"output of the combination of gates"label wires, 4-row tableGuessing from the shape of the circuit
"Y = A + B" / "1 + 1 ="Boolean OR: 1 + 1 = 1Writing 2 (ordinary addition)
"universal gates"NAND and NORChoosing AND and OR, the "basic" gates
"inputs of a NAND / NOR joined"NOT gateSaying it becomes AND or OR
"NOT gates on both inputs of NAND"OR (De Morgan)Answering AND or NOR
"input waveforms are shown"cut into slots, apply tableMissing a slot where only one input changes
"output is 0 only when both inputs are 1"NANDConfusing with NOR (1 only when both inputs are 0)
"number of NAND gates for OR / AND"3 / 2Swapping the NAND and NOR counts

Mistakes to avoid

Where this connects next

This completes the chapter. Try the Semiconductor Electronics Challenge to mix rectifiers, special diodes and logic gates in timed NEET-style sets.

Conventions: 1 = high voltage (true), 0 = low voltage (false); + = OR, · = AND, bar = NOT. XOR and XNOR are enrichment beyond the NEET list.

0:00 / 0:00

Well done. What next?

Follow the four steps: understand it, remember it, try it, then prove it with past papers.

Try it: the Chapter Challenge ›✍️ Practise this lesson: Semiconductors Beyond NCERT Q15–20: logic gatesRemember it: 5-Minute Revise‹ Previous: Lesson 8: Zener, LED, photodiode, solar cell‹ Back to chapter🏠 Physics Part 2 home