PYQ Vault

JEE Mains Physics · Semiconductor Electronics

Logic Gates: Truth Tables, Waveforms and Input Conditions

Reduce the network to one expression for Y, then evaluate it: for every input row of a truth table, for every interval of a waveform, or backwards, for the inputs that give a required output.

Why this matters

Thirty-two PYQs, every one multiple choice, and eight from 2026: the largest page in the chapter and the one asked most recently. Sixteen ask for the truth table or the output of a drawn network. Eight ask which inputs make an LED or bulb glow, or make the output go low. Eight give the inputs as waveforms and ask for the output waveform, or for the gate that made it. All of them are the same skill applied three ways, so one careful method is worth more than any shortcut.

Concept 1 of 3: Truth tables of the basic gates

Each basic gate has one row that is different from the other three. AND is 1 only for (1, 1); OR is 0 only for (0, 0); NAND and NOR are those with every output flipped. XOR is 1 when the inputs differ and XNOR when they match. Learn those single rows and any table can be written out in seconds.

Definition

  • For a network, write Y gate by gate, simplify, then evaluate it for every input row.
  • Read the row order the options use before matching. (0,0), (0,1), (1,1), (1,0) is a common order, not only (0,0), (0,1), (1,0), (1,1).
  • One row is rarely enough: (0,0) → 1 fits NAND, NOR and XNOR alike. Check a second row.
  • Multi-bit inputs, such as two 4-bit numbers, are evaluated bit by bit, place by place.
GateOutput YY for (0,0), (0,1), (1,0), (1,1)Y is 1 when
ANDA⋅BA\cdot B0, 0, 0, 1both inputs are 1
ORA+BA + B0, 1, 1, 1at least one input is 1
NOTA‾\overline{A}1 for A = 0; 0 for A = 1the input is 0
NANDA⋅B‾\overline{A\cdot B}1, 1, 1, 0at least one input is 0
NORA+B‾\overline{A + B}1, 0, 0, 0both inputs are 0
XORAB‾+A‾BA\overline{B} + \overline{A}B0, 1, 1, 0the inputs differ
XNORAB+A‾ B‾AB + \overline{A}\,\overline{B}1, 0, 0, 1the inputs are equal
The row that differs from the other three identifies each two-input gate.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

JEE Mains · 2024 · 6 April 2024 · Q13Moderate

Example 1 · Semiconductor Electronics · Logic Gates: Truth Tables, Waveforms and Input Conditions

The correct truth table for the following logic circuit is:

Check the row order

Options often list the inputs as (0,0), (0,1), (1,1), (1,0). Matching outputs against the order you wrote, rather than the order printed, picks a wrong table that looks right.

One row fits several gates

An output of 1 for (0,0) is true of NAND, NOR and XNOR. Use a second row, such as (0,1), to tell them apart.

Invert the right input

A NOT gate on one input changes only that input. Writing Ā where the circuit inverts B gives the mirror-image table, which is usually an option.

Concept 2 of 3: Finding the inputs that give a required output

Here the output is given and the inputs are asked for, so work backwards. An AND output of 1 needs every input 1; an OR output of 0 needs every input 0. Follow that back gate by gate. With only four options, putting each one through the circuit is just as quick, and it checks the backward working.

Definition

  • Write the expression for every output the question names: Y, or the outputs driving each LED.
  • An AND gate's output is 1 only if all its inputs are 1; an OR gate's output is 0 only if all its inputs are 0. A NAND output is 0 only if all its inputs are 1; a NOR output is 1 only if all its inputs are 0.
  • An LED from a gate output to earth glows when that output is 1. An LED between two outputs glows only when its anode side is 1 and its cathode side is 0.
  • A wire from an input can run to a later gate as well. Trace every wire from each input before writing the expression.
  • An input that does not appear in the simplified expression is free: either value works.

Worked example

An LED from Y to earth is driven by Y=A+B‾⋅CY = \overline{A + B}\cdot C. For which inputs does it glow?
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

JEE Mains · 2026 · 5 Apr 2026 Shift 1 · Q20Moderate

Example 2 · Semiconductor Electronics · Logic Gates: Truth Tables, Waveforms and Input Conditions

For the given logic circuit, which of the following inputs combination will make both LED-1 and LED-2 to glow?

Trace every wire from each input

An input wire can branch and feed a gate further along as well as the first gate. Missing that branch gives an expression with a variable left out and the wrong set of inputs.

An LED between two outputs needs a difference

If both ends of an LED are at logic 1, or both at 0, no current flows and it stays dark. It glows only when its anode side is 1 and its cathode side is 0.

Do not over-constrain a free input

If an input drops out of the simplified expression, any value of it works. An option is not wrong just because that input is 0 rather than 1.

Concept 3 of 3: Output waveforms of a gate network

A waveform question is a truth table spread out in time. Between two moments when an input changes, both inputs are steady, so the output is steady too. Mark every edge of either input, read the pair (A, B) in each interval, and the output in that interval is one row of the truth table.

Definition

  • Reduce the network to one expression for Y first.
  • Mark every instant where either input switches. Between two marks, A and B are constant.
  • Evaluate Y for each interval and draw it. Y can change only at an input edge.
  • The reverse question gives A, B and Y: read the triple (A, B, Y) in each interval and match the rows to a gate's truth table.

Worked example

Over 8 ms, A is high from 0 to 4 ms and low from 4 to 8 ms. B is high from 2 to 6 ms and low otherwise. Find the output of an XOR gate in each interval.
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

JEE Mains · 2023 · 30 January 2023 · Q13Moderate

Example 3 · Semiconductor Electronics · Logic Gates: Truth Tables, Waveforms and Input Conditions

The output waveform of the given logical circuit for the following inputs AA and BB as shown below, is

Mark the edges of both inputs

Splitting time only where A changes misses the intervals where B alone switches. Every edge of either input starts a new interval.

Reduce first, then read the waveforms

Working gate by gate through every interval invites slips. Reduce the network to one gate first; a chain of tied NANDs into a NAND, for example, is just OR.

Name the gate from all the intervals

When the question gives the output waveform and asks for the gate, collect every (A, B, Y) triple. Two intervals can fit more than one gate; four rows fix it.

Summary — formulas & gotchas at a glance

A revision cheat-sheet for the formulas and gotchas above. Click any concept name to jump back to its full explanation.

Reference tables (1)

Truth tables of the basic gates7 rows
GateOutput YY for (0,0), (0,1), (1,0), (1,1)Y is 1 when
ANDA⋅BA\cdot B0, 0, 0, 1both inputs are 1
ORA+BA + B0, 1, 1, 1at least one input is 1
NOTA‾\overline{A}1 for A = 0; 0 for A = 1the input is 0
NANDA⋅B‾\overline{A\cdot B}1, 1, 1, 0at least one input is 0
NORA+B‾\overline{A + B}1, 0, 0, 0both inputs are 0
XORAB‾+A‾BA\overline{B} + \overline{A}B0, 1, 1, 0the inputs differ
XNORAB+A‾ B‾AB + \overline{A}\,\overline{B}1, 0, 0, 1the inputs are equal
The row that differs from the other three identifies each two-input gate.

Watch out for (9)

Test yourself on Semiconductor Electronics

20 past JEE Mains questions from this chapter, timed at 48 minutes and marked the way the exam marks it. You see your score and every answer the moment you finish. Free to start.