Logic Gates

On this page
  1. Direct answer
  2. What you must remember
  3. Building OR from three NAND gates
  4. Where the exam tries to catch you
  5. Frequently asked questions
  6. Related topics

Direct answer

Logic gates are digital switches whose output is a fixed Boolean function of their inputs. The three basic gates are NOT, which inverts a single input, AND, which outputs 1 only when every input is 1, and OR, which outputs 1 when any input is 1. NAND and NOR are universal, since either one alone can build every other gate. De Morgan's theorems resolve most circuit-diagram questions NEET asks.

What you must remember

  • Basic behaviours: NOT gives the complement of its input; AND gives 1 only when all inputs are 1; OR gives 1 when any input is 1, written Y = A', Y = A·B and Y = A + B.
  • Universal gates: NAND gives 0 only for all-1 inputs and NOR gives 1 only for all-0 inputs, and each can construct every Boolean function on its own.
  • XOR: Y = A ⊕ B equals 1 when the inputs differ, so it acts as a difference detector and supplies the sum output of a half-adder.
  • De Morgan pair: (A·B)' = A' + B' and (A + B)' = A'·B', so a NAND is a bubbled OR and a NOR is a bubbled AND, the equivalences used to redraw circuits.
  • Two-input truth anchor: of the rows 00, 01, 10 and 11, AND lights only on 11 and NOR only on 00, the two extremes between which every two-input table sits.
  • Inverter from NAND: tying both inputs of a NAND together gives A NAND A = A', so a single gate type can supply the NOT that AND and OR cannot produce alone.

Building OR from three NAND gates

Universality is easiest to believe once you build a gate yourself. The truth table confirms the algebra row by row, and it is the reasoning NEET circuit questions expect on paper.

  1. Invert each input: Feed A into both terminals of a NAND, giving A NAND A = (A·A)' = A', and do the same for B to get B'.
  2. Combine the inverted signals: Feed A' and B' into a third NAND, so the output is (A'·B')'.
  3. Apply De Morgan: (A'·B')' = (A')' + (B')' = A + B, which is exactly an OR gate built purely from NANDs.
  4. Check the all-zero row: For A = B = 0, both inverters output 1, so the final NAND sees 1 and 1 and outputs 0, matching OR.
  5. Check the remaining rows: When any input is 1, one inverter outputs 0, so the final NAND sees a 0 and outputs 1, matching OR.
  6. Reuse the skeleton: The same three-gate skeleton with NOR in place of NAND builds AND by duality.

Where the exam tries to catch you

Gate questions reward method more than memory, and the same few slips recur.

  • Trap: tracing a cascade in your head and losing one inverted wire Correct: annotate every intermediate node, because a single flipped wire silently changes the answer the options were built around.
  • Trap: memorising gate names without their behaviour Correct: rehearse one-line definitions in both directions, such as "output is 0 only when both inputs are 1" defining NAND, since options quote them verbatim.
  • Trap: reading a NAND with inverted inputs as a new gate Correct: De Morgan shows it equals OR, and a NOR with inverted inputs equals AND, so match the drawn form to one single gate.
  • Trap: believing AND and OR are universal because they are the basic gates Correct: inversion cannot come from AND and OR alone, while NAND and NOR are universal and can supply the missing NOT.

Frequently asked questions

Which gates are called universal and why?

NAND and NOR are called universal because each one alone can generate NOT, AND and OR, and therefore any Boolean function. This lets an entire circuit be manufactured from a single gate type.

What is the truth behaviour of a two-input NAND gate?

A two-input NAND gate outputs 0 only when both inputs are 1. For the remaining input combinations 00, 01 and 10, its output is 1.

How does an XOR gate differ from an OR gate?

An XOR gate outputs 1 when its inputs differ and 0 when they are equal. The case of two 1s, which gives an OR gate a 1, is suppressed, which makes XOR useful for parity checks and binary addition.

What do De Morgan's theorems state for two variables?

De Morgan's theorems state that (A·B)' = A' + B' and (A + B)' = A'·B'. Breaking a complement over an operation flips that operation itself, which is how NAND and NOR are redrawn as bubbled OR and AND gates.

How is a NOT gate built from a single NAND gate?

A NOT gate is built by tying the two inputs of a NAND gate together. Since A NAND A = (A·A)' = A', the output is the complement of the input, the seed construction from which the universality argument grows.

Practise this in the PrepElephant app

Question banks, previous-year questions, mock tests and revision tools — for Logic Gates and NEET-UG Physics. Free to start.

Get the free app WhatsApp