Back to Study Hub
Logic Gates• 14 min read

Logic Gates and Logic Families: AND, OR, NOT, NAND, NOR, XOR and TTL vs CMOS vs ECL

Complete guide to logic gates and truth tables, universal NAND and NOR gates, XOR and XNOR, positive and negative logic, fan-out, noise margin, propagation delay, and TTL vs CMOS vs ECL for technical exams.

By MCQ Arena TeamUpdated June 24, 2026

Logic gates are the atoms of digital electronics: combine a handful of them and you can build adders, multiplexers, memories and entire processors. Knowing each gate's truth table cold, and knowing how the logic families that implement them differ in speed, power and noise immunity, is the backbone of every technical recruitment exam in this field.

This article covers the basic gates and their truth tables, the universal NAND and NOR gates and how to realise any function from them, XOR and XNOR behaviour, positive versus negative logic, the family parameters that decide a design (fan-in, fan-out, propagation delay, noise margin, power dissipation, speed-power product), a head-to-head TTL versus CMOS versus ECL comparison, open-collector and tri-state outputs, and why CMOS dominates modern VLSI. Expect 4 to 6 marks from this area, mostly fast truth-table and parameter-recall questions.

Basic Logic Gates and Truth Tables

A logic gate produces a binary output from one or more binary inputs according to a Boolean rule. The three fundamental gates are AND (output 1 only if all inputs are 1), OR (output 1 if any input is 1) and NOT (inverter, output is the complement of the input). From these, NAND, NOR, XOR and XNOR are built.

ABANDORNANDNOR
000011
010110
100110
111100
NAND = (A . B)' , NOR = (A + B)' , NOT(A) = A'

Bar denotes NOT; dot denotes AND; plus denotes OR

Exam tip: NAND is AND followed by an inverter, and NOR is OR followed by an inverter. Their truth tables are simply the AND and OR columns inverted, which is why the table above places them side by side.

XOR and XNOR Gates

The XOR (exclusive-OR) gate outputs 1 when its inputs differ, and the XNOR (exclusive-NOR) gate outputs 1 when its inputs are equal. XOR is the heart of adders, parity generators and comparators.

ABXOR (differ)XNOR (equal)
0001
0110
1010
1101

For multiple inputs, an XOR chain outputs 1 when the number of 1s is odd (odd-parity behaviour), and XNOR outputs 1 when the count of 1s is even. Exam tip: a 2-input XNOR is a 1-bit equality comparator, and XOR with one input tied to 1 acts as an inverter.

Universal Gates: NAND and NOR

NAND and NOR are called universal gates because any Boolean function can be built using only NAND gates or only NOR gates. This is economically important: a chip can stock a single gate type. The realisations to memorise:

FunctionUsing only NANDUsing only NOR
NOTBoth inputs tied togetherBoth inputs tied together
ANDNAND then NAND-inverterNOR each input then NOR
ORNAND each input then NANDNOR then NOR-inverter
Min. NAND for NOR / NOR for NAND4 NAND make a NOR4 NOR make a NAND

Common mistake: assuming OR needs fewer NAND gates than AND. To build AND from NAND you need 2 gates (NAND plus inverter); to build OR from NAND you also need to invert both inputs first, giving 3 gates. The counts are not symmetric, so memorise them.

Positive vs Negative Logic

In positive logic the higher voltage represents 1 and the lower voltage represents 0. In negative logic the assignment is reversed: the lower voltage is 1. The physical circuit does not change; only the interpretation does.

The key consequence: a gate that is AND in positive logic becomes OR in negative logic, and vice versa; similarly NAND becomes NOR. This is the duality between positive and negative logic. Exam tip: a positive-logic NAND is the same physical device as a negative-logic NOR.

Logic Family Parameters

A logic family is a set of compatible ICs sharing the same circuit technology and voltage levels. The parameters below decide which family suits an application.

  • Fan-in: the number of inputs a gate can accept.
  • Fan-out: the maximum number of similar gate inputs one output can drive while keeping valid logic levels. Higher is better.
  • Propagation delay (tpd): the time for an input change to affect the output. Lower means faster.
  • Noise margin: the largest noise voltage a gate tolerates without a false logic change. Higher means more immune.
  • Power dissipation: power consumed per gate. Lower is better, especially for battery and VLSI use.
  • Speed-power product: propagation delay multiplied by power dissipation, measured in joules; a single figure of merit where lower is better.
Speed-Power Product = tpd x PD (units: joules)

A figure of merit for a logic family; lower value indicates a more efficient family

Exam tip: noise margin is computed separately for high and low levels: NMH = VOH - VIH and NML = VIL - VOL. The worst (smaller) of the two limits the design.

TTL vs CMOS vs ECL

The three classic families trade speed, power and noise immunity differently. TTL (Transistor-Transistor Logic) uses bipolar transistors and is a robust general-purpose family. CMOS (Complementary MOS) uses complementary MOSFETs for very low static power. ECL (Emitter-Coupled Logic) keeps transistors out of saturation for the highest speed at the cost of high power.

ParameterTTLCMOSECL
DeviceBipolar (BJT)MOSFETBipolar (BJT)
Speed (delay)MediumLow to mediumHighest (fastest)
Static powerMediumVery lowVery high
Noise marginModerateHigh (best)Low (worst)
Fan-outAbout 10Very high (about 50)About 25
Packing densityLowVery highLow

Exam tip: ECL is fastest because its transistors never saturate, so there is no storage-time delay; CMOS has the best noise margin and lowest static power; TTL sits in the middle. Common mistake: assuming CMOS is always fastest. CMOS static power is lowest, but ECL wins on raw speed.

Open-Collector and Tri-State Outputs

A standard totem-pole / push-pull output actively drives both high and low and must never be wired directly to another such output (it causes bus contention). Two alternatives solve this:

  • Open-collector (open-drain): the output transistor pulls low only; an external pull-up resistor provides the high level. Several open-collector outputs can be tied together to form a wired-AND (the bus is high only if all outputs are off), and they can drive higher-voltage loads.
  • Tri-state (three-state): adds a high-impedance (Hi-Z) state controlled by an enable line, in addition to logic 0 and 1. When disabled the output electrically disconnects, letting many devices share a common bus with only one driving at a time. This is how data and address buses in microprocessors work.

Common mistake: confusing Hi-Z with logic 0. Hi-Z is a third, floating state, not a low output. Tri-state has three output conditions: 0, 1 and Hi-Z.

Why CMOS Dominates VLSI

Modern microprocessors and memories are overwhelmingly CMOS for several compounding reasons:

  1. Negligible static power: in steady state one of the complementary transistors is always off, so almost no current flows. Power is consumed mainly while switching, which matters enormously when packing billions of gates.
  2. High packing density: small MOSFETs allow far more gates per unit area than bipolar TTL or ECL.
  3. High noise margin and wide supply range: robust operation simplifies large designs.
  4. High fan-out at DC: the high input impedance lets one output drive many inputs.

Exam tip: CMOS dynamic power rises with frequency (P = C V2 f), so very high-speed niches still favour ECL, but for general VLSI the low static power and density of CMOS are decisive.

Key Takeaways
  • AND outputs 1 only if all inputs are 1; OR outputs 1 if any input is 1; NAND and NOR are their inverted forms.
  • XOR outputs 1 when inputs differ (odd number of 1s); XNOR outputs 1 when inputs are equal.
  • NAND and NOR are universal: any function can be built from one of them; memorise the gate counts.
  • A positive-logic AND equals a negative-logic OR; positive-logic NAND equals negative-logic NOR (duality).
  • Key parameters: fan-out, propagation delay, noise margin, power; speed-power product = delay times power.
  • ECL is fastest (no saturation), CMOS has lowest static power and best noise margin, TTL is the middle ground.
  • Open-collector needs a pull-up and gives wired-AND; tri-state adds a Hi-Z state for shared buses.
  • CMOS dominates VLSI due to negligible static power, high density, high noise margin and high fan-out.

Practice MCQs

Q1. A two-input gate gives output 1 only when both inputs are 0. Which gate is it?

  • A.NAND
  • B.NOR
  • C.XOR
  • D.AND

Correct Answer: B

Explanation: NOR outputs 1 only when all inputs are 0 (it is OR inverted). For inputs 00 the OR is 0, so NOR is 1; every other combination gives 0.

Q2. Why are NAND and NOR called universal gates?

  • A.They are the fastest gates
  • B.Any Boolean function can be built using only that one gate type
  • C.They use the least power
  • D.They have unlimited fan-out

Correct Answer: B

Explanation: NAND and NOR are functionally complete: AND, OR and NOT can all be derived from either alone, so any logic function can be realised with just one gate type.

Q3. A 2-input XOR gate produces a HIGH output when:

  • A.Both inputs are HIGH
  • B.Both inputs are LOW
  • C.The two inputs are different
  • D.The two inputs are the same

Correct Answer: C

Explanation: XOR (exclusive-OR) outputs 1 only when its inputs differ. Equal inputs (00 or 11) give 0, which is the XNOR condition.

Q4. In a logic family, the maximum number of similar gate inputs that one output can drive is called the:

  • A.Fan-in
  • B.Fan-out
  • C.Noise margin
  • D.Propagation delay

Correct Answer: B

Explanation: Fan-out is the load-driving capability of an output. Fan-in is the number of inputs a gate accepts; these two are commonly confused.

Q5. Which logic family offers the highest operating speed?

  • A.Standard TTL
  • B.CMOS
  • C.ECL
  • D.Schottky TTL

Correct Answer: C

Explanation: ECL is fastest because its transistors never enter saturation, eliminating storage-time delay. The trade-off is high power dissipation and lower noise margin.

Q6. A positive-logic NAND gate behaves as which gate in negative logic?

  • A.NAND
  • B.AND
  • C.NOR
  • D.OR

Correct Answer: C

Explanation: By positive-negative logic duality, AND and OR swap and NAND and NOR swap. A positive-logic NAND is the same physical device as a negative-logic NOR.

Q7. The high-impedance (Hi-Z) state is associated with which type of output?

  • A.Totem-pole output
  • B.Open-collector output
  • C.Tri-state output
  • D.Open-emitter output

Correct Answer: C

Explanation: A tri-state output has three conditions: logic 0, logic 1 and a high-impedance Hi-Z state controlled by an enable line, allowing multiple devices to share a common bus.

Q8. The main reason CMOS dominates VLSI design is its:

  • A.Highest switching speed
  • B.Very low static power dissipation and high packing density
  • C.Lowest cost transistors
  • D.Largest noise generation

Correct Answer: B

Explanation: In steady state one complementary transistor is always off, so static current is negligible. Combined with very high packing density and good noise margin, this makes CMOS ideal for billions of gates.

MA

MCQ Arena Team

Subject reviewers & exam mentors

This guide is written and fact-checked by the MCQ Arena editorial team — engineering graduates and competitive-exam mentors who build the question banks used on the platform. Every concept, formula and MCQ is cross-checked against standard textbooks and the latest Wireless PSI / GPSC exam pattern. Spotted an error or have a correction? Tell us — we update articles as syllabi and feedback come in.

Last reviewed and updated on June 24, 2026.

Put it into practice

Reading strategy is one thing — building it into instinct takes timed reps. Practise with daily timed mock tests on MCQ Arena.

Start practising free

Keep reading