Fundamentholfundamenthol

Logic Gates

PhysicsElectronic DevicesFor JEE aspirants

Logic gates are digital circuits whose output, 0 or 1, follows a fixed logical rule of the inputs, written as a truth table or a Boolean expression. NOT, OR and AND are the basic gates; NAND and NOR are universal, because each alone can build every other gate. This page covers digital signals, gate symbols and truth tables, Boolean algebra and De Morgan's theorems, timing diagrams, universal gates, diode logic and ICs. Logic gates give quick, scoring questions in NEET and JEE Main.

On this page1Digital signals2Gates and truth tables3Boolean algebra4Waveforms5Universal gates6Identifying circuits7Diode logic and ICs8Revision
Key Formulas - Quick Reference
  1. ★ Must learn NOT: ; OR: ; AND:
  2. ★ Must learn NAND: (0 only when all inputs are 1); NOR: (1 only when all inputs are 0)
  3. XOR: (1 when the inputs differ); XNOR: (1 when they are equal)
  4. ★ Must learn De Morgan: and
  5. Identities: , , , , , , ,
  6. Absorption: , ,
  7. ★ Must learn Universal gates: NAND makes NOT ( gate), AND (), OR (); NOR makes NOT (), OR (), AND ()
  8. A gate with inputs has rows in its truth table
  9. ★ Must learn Output column for : AND 0001, OR 0111, NAND 1110, NOR 1000, XOR 0110, XNOR 1001

1. Analog and Digital Signals

An analog signal is a voltage or current that varies continuously with time and can take any value in a range (the output of a microphone, a sine wave). A digital signal has only two allowed levels, written with the binary digits 0 and 1. In positive logic the high level, say , is 1 and the low level, , is 0.

Analog signal and digital signal Left: an analog signal, a smooth voltage that can take any value in a range as time passes. Right: a digital signal, a pulse train that has only two levels, high (1, about 5 volt) and low (0, zero volt). t V (a) Analog signal continuous: any value in a range t V (b) Digital signal 1 (5 V) 0 (0 V) only two levels: high = 1, low = 0
Figure 1: An analog signal varies continuously; a digital signal has only two levels. In positive logic the high level ( here) is 1 and the low level () is 0.

A room light is a simple digital system: the switch is either ON or OFF (input) and the lamp is either lit, 1, or dark, 0 (output). Digital circuits built from logic gates run calculators, digital watches, computers, robots, industrial controls and telecommunication systems.

Why only two levels? A circuit only has to decide "high or low", so a noisy or slightly distorted signal (say instead of ) is still read correctly. This noise immunity is the main reason digital electronics replaced analog processing in computers and communication.

2. Logic Gates and Truth Tables

  • Logic gate: a digital circuit whose output is related to its inputs by a fixed logical rule. It is called a gate because it controls the flow of information.
  • Truth table: lists the output for every combination of inputs; inputs give rows.
  • Boolean expression: the same rule in algebra: means OR, means AND and a bar means NOT.
Logic gate symbols: NOT, OR, AND, NAND, NOR, XOR and XNOR Seven logic gate symbols with their Boolean expressions. NOT: Y equals A bar. OR: Y equals A plus B, output 1 if any input is 1. AND: Y equals A dot B, output 1 only if all inputs are 1. NAND: A dot B bar, output 0 only when all inputs are 1. NOR: A plus B bar, output 1 only when all inputs are 0. XOR: output 1 when the inputs differ. XNOR: output 1 when the inputs are equal. A small circle (bubble) on a symbol means NOT. NOT A Y Y = A output = opposite of input OR A B Y Y = A + B 1 if any input is 1 AND A B Y Y = A·B 1 only if all inputs are 1 NAND A B Y Y = A·B 0 only if all inputs are 1 NOR A B Y Y = A + B 1 only if all inputs are 0 XOR A B Y Y = A ⊕ B 1 if the inputs differ XNOR A B Y Y = A ⊕ B 1 if the inputs are equal Reading the symbols bubble = NOT NAND = AND + NOT NOR = OR + NOT XNOR = XOR + NOT basic: NOT, OR, AND universal: NAND, NOR
Figure 2: The seven gate symbols. A bubble at the output means NOT, so NAND and NOR . NOT, OR and AND are the basic gates; NAND and NOR are universal.

The five common gates are NOT, OR, AND, NAND and NOR; XOR and XNOR are built from them but are asked often enough to learn too. One table holds all of them:

NOT ORANDNANDNORXORXNOR
001001101
011101010
100101010
110110001
  • NOT (inverter): one input, one output; it gives the opposite of the input, .
  • OR: two or more inputs; if any input is 1, .
  • AND: two or more inputs; only if all inputs are 1, .
  • NAND (NOT-AND): an AND followed by a NOT; only when all inputs are 1.
  • NOR (NOT-OR): an OR followed by a NOT; only when all inputs are 0, that is, neither one input nor the other is 1.
  • XOR (exclusive OR): when the inputs are different; XNOR gives 1 when they are equal (an equality detector).
Exam Trick

Remember only the odd row. AND is 1 only for 11; OR is 0 only for 00; NAND is 0 only for 11; NOR is 1 only for 00. A bubble flips the whole output column. The same rules hold for 3 or more inputs: a 3-input NAND is 0 only for 111, one row out of 8.

2.1 Switch analogy

Think of a closed switch as 1 and a lit lamp as 1. Switches in series behave as AND, switches in parallel as OR, and a switch connected across the lamp behaves as NOT.

Switch and lamp analogies of AND, OR and NOT gates Three lamp circuits. AND: two switches in series with a lamp; with switch A closed and B open the lamp is off. OR: two switches in parallel; with A closed and B open the lamp is on. NOT: a switch connected across the lamp with a series resistor; closing the switch shorts the lamp so it goes off. AND: switches in series + A = 1 B = 0 Y = A·B = 0 lamp off: both must be closed OR: switches in parallel + A = 1 B = 0 Y = A + B = 1 lamp on: one closed switch is enough NOT: switch across the lamp + R A = 1 Y = A = 0 closed switch shorts the lamp
Figure 3: A closed switch is 1 and a lit lamp is 1. With , : series (AND) gives , parallel (OR) gives , and a switch across the lamp (NOT) turns it off, so .
OR (inclusive)

Output 1 for and . Column: 0111. Switches in parallel.

XOR (exclusive)

Output 1 for and only; 0 for 11. Column: 0110. .

Quick Recall: tap to check
NAND gate with , : what is ?
.
Which gate gives 1 only when both inputs are 0?
NOR.
How many rows does the truth table of a 3-input gate have?
.
Key idea
AND needs all 1s, OR needs any 1, the bubble inverts. NAND is 0 only for all 1s; NOR is 1 only for all 0s.

3. Boolean Algebra and De Morgan's Theorems

Boolean algebra (after George Boole) works with variables that can only be 0 or 1. Its rules look like ordinary algebra with a few surprises: in Boolean algebra , because OR only asks whether any input is 1.

LawOR formAND form
Identity
Null (dominance)
Idempotent
Complement
Double NOT
Commutative
Distributive
Absorption

De Morgan's theorems let you move a bar across an operator: break the bar and change the sign.

The first says a NOR gate is an AND gate with inverted inputs; the second says a NAND gate is an OR gate with inverted inputs. Proof of the first by truth table (the last two columns match):

0001111
0110100
1010010
1110000
Key idea
De Morgan: break the bar, change the sign. and .

4. Timing (Waveform) Diagrams

Gates also reshape pulse trains. When the inputs are given as waveforms, the output changes only at an instant where some input changes, so the method is always the same:

  1. Draw a vertical line at every edge of every input and label the instants
  2. In each interval read and (high , low ).
  3. Apply the gate's rule to get for that interval.
  4. Draw as flat segments that change level only at the marked instants.
Output waveforms of OR and AND gates for the same inputs Timing diagram with inputs A and B and the outputs of an OR gate and an AND gate, with time marks t1 to t6. A is high from t1 to t3 and from t5 to t6. B is high from t2 to t4 and after t6. The OR output is high whenever either input is high: from t1 to t4 and from t5 onwards. The AND output is high only while both inputs are high, from t2 to t3. t1 t2 t3 t4 t5 t6 A B OR: A + B AND: A·B
Figure 4: Same inputs, two gates. OR output is high wherever either input is high ( to and after ); AND output is high only where both are high ( to ).
NAND gate output waveform Timing diagram for a NAND gate. Inputs A and B, the dashed AND of the inputs, and the NAND output, which is the AND waveform turned upside down. The output is low only before t1 and from t4 to t5, where both inputs are high, and high in every other interval. t1 t2 t3 t4 t5 t6 A B A·B Y = A·B
Figure 5: NAND output is AND upside down. Both inputs are 1 only before and from to , so there and everywhere else (interval values ).
Exam Trick

OR = union, AND = overlap. Shade the high parts of both inputs: the OR output is high wherever any shading exists; the AND output only where the shadings overlap. NAND and NOR are these outputs turned upside down. If one input of a NAND is held at 1, the output is just the other input inverted.

Key idea
Waveforms: cut time at every input edge, apply the truth table interval by interval; the output can change only at an input edge.

5. Universal Gates: NAND and NOR

NOT, AND and OR together can realise any logic function. A gate that can produce all three by itself is called universal: NAND and NOR are the two universal gates. That is why a chip maker can build a whole processor from one type of gate.

NAND as a universal gate: NOT, AND and OR from NAND gates only Three circuits built only from NAND gates. NOT: one NAND gate with its inputs joined. AND: a NAND gate followed by a NAND gate used as NOT, two gates. OR: each input inverted by a NAND gate with joined inputs, then a third NAND gate, which gives A plus B by De Morgan's theorem. NOT 1 gate A Y = A inputs joined AND 2 gates A B A·B Y = A·B NOT of NAND OR 3 gates A A B B Y = A + B De Morgan
Figure 6: NAND alone makes every gate. Join the inputs: NOT ( gate). NAND then NOT: AND (). Invert both inputs, then NAND: , OR ().
NOR as a universal gate: NOT, AND and OR from NOR gates only Three circuits built only from NOR gates. NOT: one NOR gate with its inputs joined. OR: a NOR gate followed by a NOR gate used as NOT, two gates. AND: each input inverted by a NOR gate with joined inputs, then a third NOR gate, which gives A dot B by De Morgan's theorem. NOT 1 gate A Y = A inputs joined OR 2 gates A B A + B Y = A + B NOT of NOR AND 3 gates A A B B Y = A·B De Morgan
Figure 7: NOR alone also makes every gate. Join the inputs: NOT ( gate). NOR then NOT: OR (). Invert both inputs, then NOR: , AND ().
Gate to buildNAND gates neededNOR gates needed
NOT11
AND23
OR32
NAND14
NOR41
XOR45
XNOR54
Exam Trick

1-2-3, and the names swap. With NAND: NOT 1, AND 2, OR 3. With NOR: NOT 1, OR 2, AND 3. The "own" function (AND for NAND, OR for NOR) needs only 2 gates: the gate plus one more as NOT.

JEE Advanced

XOR from four NAND gates. Let . Two more NANDs give and , and the fourth gives . This is 1 only when exactly one input is 1, so with 4 gates (5 NOR gates are needed).

Half adder. Adding two bits gives Sum and Carry (for : Sum 0, Carry 1, the binary number 10). One XOR and one AND gate add two bits, which is how arithmetic starts in a processor.

Quick Recall: tap to check
Minimum number of NAND gates for an OR gate? For an AND gate?
3 and 2.
How is a NOR gate turned into a NOT gate?
Join its two inputs (or hold one input at 0).
Are XOR or AND gates universal?
No. Only NAND and NOR are universal gates.

6. Identifying Gate Combinations

Most exam questions give a small network of gates and ask which single gate it equals. Label every intermediate output, fill a 4-row truth table, then read the output column. The same few combinations come again and again:

Four common gate combinations and De Morgan's theorems Four small circuits. (a) A NOR gate followed by a NOT gate acts as an OR gate. (b) NOT gates on both inputs of a NOR gate make an AND gate. (c) NOT gates on both inputs of an AND gate make a NOR gate. (d) NOT gates on both inputs of an OR gate make a NAND gate. The last two are De Morgan's theorems. (a) NOR, then NOT A B Y Y = A + B: an OR gate a double NOT cancels (b) NOT on each input, then NOR A B Y Y = A·B: an AND gate NOR of A and B (c) NOT on each input, then AND A B Y Y = A·B = A + B: NOR De Morgan's first theorem (d) NOT on each input, then OR A B Y Y = A + B = A·B: NAND De Morgan's second theorem
Figure 8: Four combinations examiners love. (a) and (b) are NCERT Exercise 14.11. (c) and (d) are De Morgan's theorems: and .
CircuitOutputActs as
NOR, then NOTOR
NAND, then NOTAND
NOT on each input, then NORAND
NOT on each input, then NANDOR
NOT on each input, then ANDNOR
NOT on each input, then ORNAND
NAND or NOR with inputs joinedNOT
Two NOT gates in seriesno change (buffer)

Bubble pushing. Moving a bubble from the output of a gate to all of its inputs (or the reverse) swaps AND with OR. So an OR gate with bubbles on both inputs is a NAND, and an AND gate with bubbles on both inputs is a NOR. Two bubbles on the same wire cancel.

XOR from basic gates. The expression can be read straight off as a circuit: two NOT gates, two AND gates and one OR gate.

XOR gate built from NOT, AND and OR gates Circuit for the exclusive OR. Input A goes to one AND gate directly and through a NOT gate to the other; input B likewise. The first AND gate gives A and not B, the second gives not A and B, and an OR gate combines them, so Y equals A XOR B. The truth table beside it reads 0, 1, 1, 0. A B B A A·B A·B Y Y = A·B + A·B = A ⊕ B A B Y 0 0 0 0 1 1 1 0 1 1 1 0
Figure 9: uses 2 NOT, 2 AND and 1 OR gate. Output is 1 only when the inputs differ: for . (The hop shows wires crossing without a joint.)
Quick Recall: tap to check
NOT gates on both inputs of an AND gate give which gate?
NOR, since .
A NOR gate followed by a NOT gate gives which gate?
OR (the two NOTs cancel).
Simplify and .
and .
Key idea
Label, tabulate, compare: name every intermediate output, fill the 4-row table, and match the output column to a known gate.

7. Gates from Diodes, and Integrated Circuits

Gates are built from semiconductor devices. The simplest are made of diodes and a resistor (positive logic, and ). In the OR gate, any input at forward biases its diode and lifts the output; the other diode is then reverse biased and isolates its input. In the AND gate, any input at forward biases its diode and pulls the output down; the output stays high only when both inputs are high.

OR and AND gates made from diodes and a resistor Diode logic. (a) OR gate: inputs A and B each feed the output through a diode pointing towards the output, and a resistor goes from the output to ground; a high input makes its diode conduct and the output goes high. (b) AND gate: a resistor goes from plus five volt to the output, and diodes point from the output to each input; a low input makes its diode conduct and pulls the output low. (a) Diode OR gate A D1 B D2 Y R any input at 5 V pulls Y up to 5 V (b) Diode AND gate +5 V R Y A D1 B D2 any input at 0 V pulls Y down to 0 V
Figure 10: Diode-resistor logic (ideal diodes, , ). OR: any high input forward biases its diode, so . AND: any low input forward biases its diode and pulls to ; only leaves at . With Si diodes the levels shift by (OR high , AND low ).

7.1 Integrated circuits (ICs)

  • An IC holds many transistors, diodes, resistors, capacitors and their connecting wires on one piece of semiconductor crystal (a chip), made by photolithography. Many logic gates are integrated in one chip.
  • The IC was invented by Jack Kilby at Texas Instruments in 1958; he received the Nobel Prize in Physics in 2000. ICs are found in cars, televisions, phones and almost every electrical device.
  • A microprocessor is an IC that processes all the information in a computer: keys pressed, programs, games.
  • Moore's law (Gordon Moore, co-founder of Intel): the number of transistors on a chip doubles at a steady rate, about every two years, while each transistor gets smaller and cheaper. Moore joked that if cars had improved as fast, a luxury car would travel half a million miles on a gallon and be cheaper to throw away than to park.

8. One-Mark Facts and Revision

QuestionAnswer
Basic gatesNOT, OR, AND
Universal gatesNAND, NOR
Gate with one inputNOT (inverter)
Rows for inputs
Bubble on a symbolNOT (inversion)
Equality detectorXNOR
Positive logic high (), low ()
IC inventorJack Kilby, Texas Instruments, 1958 (Nobel 2000)

Use the flowchart for any gate or waveform problem, then the mind map for a last revision.

Flowchart for identifying logic gate circuits and waveforms Decision flowchart. If the inputs are waveforms, mark every edge and list the inputs in each interval; if a circuit is given, name every intermediate gate output. Then apply each gate's rule to every row of the truth table. If the output column matches a known gate, name it; otherwise write the Boolean expression and simplify it with De Morgan's theorems. A note lists the output columns of AND, OR, NAND, NOR, XOR and XNOR. yes no yes no Gate circuit or waveforms: find Y Inputs given as waveforms? Mark every edge t1, t2 ...; list A, B in each interval Name each gate output Y1, Y2, ... in order Apply each gate's rule to every row (2 inputs: rows 00, 01, 10, 11) Y column matches a known gate? Name it from the Y column (table below) Write Y in Boolean form; simplify with De Morgan Y for AB = 00, 01, 10, 11: AND 0001, OR 0111, NAND 1110 NOR 1000, XOR 0110, XNOR 1001, NOT A (for A = 0, 1): 10
Figure 11: Problem-solving flowchart for gate questions. Memorise the output columns in the note: reading for names the gate in one glance.
Mind map of logic gates Revision mind map with seven branches: signals, basic gates, derived gates, Boolean algebra, universal gates, waveforms and integrated circuits, each with its key facts. Logic gates Signals analog: continuous digital: only 0 and 1 positive logic: 1 = 5 V 0 = 0 V (low) Basic gates NOT: Y = Ā (inverter) OR: Y = A + B, any 1 AND: Y = A·B, all 1 switches: AND series, OR parallel Derived gates NAND: 0 only for 11 NOR: 1 only for 00 XOR: 1 if inputs differ XNOR: 1 if inputs equal Boolean algebra A + 1 = 1, A·0 = 0 A + Ā = 1, A·Ā = 0 NOT(A + B) = Ā·B̄ NOT(A·B) = Ā + B̄ Universal gates NAND: NOT 1, AND 2, OR 3 NOR: NOT 1, OR 2, AND 3 join inputs = NOT XOR: 4 NAND or 5 NOR Waveforms cut at every edge OR: high if any high AND: high only if both high NAND, NOR: flip AND, OR ICs many gates on one chip Kilby (TI) 1958, Nobel 2000 photolithography Moore's law: about 2 years
Figure 12: Mind map for revision: every exam fact about logic gates on one screen.

9. Solved Examples

Solved Example 1
Inputs and of an OR gate vary as in Figure 4 ( high from to and from to ; high from to and after ). Find the output waveform.
Solution:
Interval (OR)
before 000
to 101
to 111
to 011
to 000
to 101
after 011

Answer: is low before and from to , and high in every other interval, as drawn in Figure 4. OR is 0 only where both inputs are 0.

Solved Example 2
The same inputs are applied to an AND gate. Sketch the output.
Solution:
Interval (AND)
before 000
to 100
to 111
to 010
to 000
to 100
after 010

Answer: is high only from to , the one interval where both inputs are high; it is low everywhere else (Figure 4).

Solved Example 3
A NAND gate has inputs: before , from to , from to , after ; is before , then alternates in the intervals up to , and is after . Find .
Solution:
Interval (NAND)
before 110
to 001
to 011
to 101
to 110
to 001
after 011

Answer: only before and from to , where ; in the other five intervals (Figure 5).

Solved Example 4
Show that circuit (a) of Figure 8 (a NOR gate followed by a NOT gate) acts as an OR gate, and circuit (b) (NOT gates on both inputs of a NOR gate) acts as an AND gate.
Solution:

(a) The NOR output is ; the NOT gate inverts it again:

0010
0101
1001
1101

(b) The NOR gate receives and :

00110
01100
10010
11001

Answer: column is OR, and column is AND. By De Morgan, .

Solved Example 5
Identify the logic operation of two NAND circuits: (a) a NAND gate whose output feeds a second NAND gate with its inputs joined; (b) and each pass through a NAND gate with joined inputs, and the two outputs feed a third NAND gate.
Solution:

A NAND gate with joined inputs gives , a NOT gate.

(a) . Column : AND.

00110
01101
10011
11001

(b) Column : OR (De Morgan: ).

Answer: (a) AND, 2 gates; (b) OR, 3 gates (Figure 6).

Solved Example 6
and feed a NOR gate; its output goes to both inputs of a second NOR gate. Write the truth table and identify the operation.
Solution:
0010
0101
1001
1101

For , : , so both inputs of the second gate are 0 and . The other rows follow the same way.

Answer: OR (column ): a NOR gate followed by a NOR used as NOT.

Solved Example 7
A gate gives for . The gate is
(A) AND
(B) NAND
(C) NOR
(D) XOR
Solution:

Answer: (C). The output is 1 only when both inputs are 0, the NOR rule . AND would read 0001, NAND 1110 and XOR 0110.

Solved Example 8
The Boolean expression represents
(A) OR
(B) AND
(C) NAND
(D) NOR
Solution:

Answer: (B). By De Morgan, , the AND function. Check one row: gives , and every other row gives 0.

Solved Example 9
Simplify .
Solution:

Distribute: .

Answer: ; the output does not depend on at all. (Shortcut: the distributive law with gives .)

Solved Example 10
Using the inputs of Figure 4, find the output of a NOR gate in each interval.
Solution:
Interval (NOR)
before 001
to 100
to 110
to 010
to 001
to 100
after 010

Answer: the NOR output is the OR output of Figure 4 turned upside down: high only before and from to , where both inputs are 0.

Solved Example 11
In the diode OR gate of Figure 10, , and . Find and the current in for (a) ideal diodes, (b) silicon diodes with a drop. Which diode conducts?
Solution:

has its anode at and conducts. then has its anode at and its cathode at the output (high), so it is reverse biased and carries no current.

(a) Ideal: and .

(b) Silicon: and .

Answer: (a) , ; (b) , ; only conducts. is still read as logic 1.

Solved Example 12
The output of a NOR gate is 1. What are its inputs? What if the output of a NAND gate is 0?
Solution:

NOR is 1 only in the row ; NAND is 0 only in the row .

Answer: NOR output 1 means ; NAND output 0 means . Each gives one unique row, so the inputs are fixed completely.

Practice Questions
  1. Write the truth table of a NAND gate whose two inputs are joined and fed by . Which operation does it perform?Answer: : ; : . It is a NOT gate.
  2. A NOR gate has its inputs joined. A second circuit sends and through NOR gates with joined inputs and then into a third NOR gate. Identify both operations.Answer: First: NOT. Second: , AND.
  3. Which gate gives an output 1 only when its two inputs are different?Answer: XOR
  4. An AND gate is followed by a NOT gate. Find for , and name the combination.Answer: 0; NAND
  5. Simplify .Answer:
  6. A 3-input NAND gate: how many rows are in its truth table, and in how many is the output 0?Answer: 8 rows; output 0 only in one row ()
  7. What is the minimum number of NOR gates needed to make an AND gate?Answer: 3
  8. In a NAND gate, is held at 1 and is a square wave . What is the output?Answer: : with ,

Common Mistakes to Avoid

Watch out
  • Treating as ordinary addition. In Boolean algebra (OR), not 2.
  • Writing . De Morgan: when the bar breaks, the sign changes, so .
  • Taking NAND as AND with inverted inputs. , while is NOR.
  • Mixing up OR and XOR. They differ only for : OR gives 1, XOR gives 0.
  • Missing an edge in a waveform problem. Mark every edge of every input; the output can change only there.
  • Using 2 NAND gates for OR or 2 NOR gates for AND. The own function needs 2 gates, the other needs 3 (NAND: AND 2, OR 3; NOR: OR 2, AND 3).
  • Calling AND, OR or XOR universal. Only NAND and NOR can build every other gate on their own.
  • Ignoring the drop in diode logic with silicon diodes: the OR high level is , and the AND low level is .

Frequently Asked Questions

What is a logic gate?

A logic gate is a digital circuit whose output, 0 or 1, follows a fixed logical rule of its inputs. Its behaviour is given by a symbol, a truth table listing the output for every input combination, and a Boolean expression. The common gates are NOT, OR, AND, NAND and NOR, with XOR and XNOR built from them.

Why are NAND and NOR called universal gates?

NOT, AND and OR together can realise any logic function, and a NAND gate alone can build all three: NOT with one gate, AND with two, OR with three. A NOR gate alone does the same: NOT with one, OR with two, AND with three. So a complete digital system can be made from only NAND or only NOR gates.

What is the difference between OR and XOR gates?

An OR gate gives 1 when at least one input is 1, including when both are 1. An XOR (exclusive OR) gate gives 1 only when the inputs are different, so for both inputs 1 it gives 0. Their output columns for inputs 00, 01, 10, 11 are 0111 and 0110.

What are De Morgan's theorems?

De Morgan's theorems say that the complement of A plus B equals A bar times B bar, and the complement of A times B equals A bar plus B bar. In words: break the bar and change the sign. They show that a NOR gate equals an AND gate with inverted inputs, and a NAND gate equals an OR gate with inverted inputs.

How do you find the output waveform of a logic gate?

Draw a vertical line at every instant where any input changes and label the instants. In each interval read the input levels as 0 or 1, apply the gate's truth table and draw the output as a flat level for that interval. The output can change only at an input edge, which makes the method quick and reliable.

How is an OR gate made from NAND gates?

Invert each input with a NAND gate whose two inputs are joined, then feed A bar and B bar into a third NAND gate. Its output is the complement of A bar times B bar, which by De Morgan's theorem equals A plus B. So three NAND gates make an OR gate, while two NAND gates make an AND gate.

Which logic gate questions come in NEET?

NEET usually asks for the output of a small combination of gates, the gate that matches a given truth table, NAND and NOR as universal gates, and output waveforms for given input pulses. Knowing the output columns of all gates and De Morgan's theorems lets you answer most of these in under a minute.

How are logic gates asked in JEE Main?

JEE Main gives a network of two to four gates and asks for its truth table or the single gate it equals, Boolean simplification with De Morgan's theorems, and timing diagrams. Circuits with NAND or NOR gates wired as inverters, and XOR built from basic gates, are common. Label each intermediate output to avoid errors.

Previous year questions on Logic Gates

21 questions from past papers, each with a step-by-step solution.

Show all 21 questions

Ready to master Electronic Devices?

Take a full mock test, practice concept-by-concept, and get an AI-powered rank prediction — all on Fundamenthol.