Skip to content
Computer ScienceCBSE Class 11 · Boolean Logic

De Morgan's Laws, Universal Gates and Logic Circuits Class 11 Computer Science

Updated 17 October 2026 · Fact-checked

De Morgan's laws state that (A.B)' = A' + B' and (A + B)' = A'.B'. NAND and NOR are universal gates because NOT, AND and OR can each be built from either of them alone. A logic circuit is read by writing the output of each gate in turn, from the inputs to the final output.

A NAND with tied inputs is a NOT; AND is NAND then NOT; OR is NAND of the inverted inputs, since NAND(A',B') = A+B by De Morgan.

Illustration drawn for QuestionBuddy.

Understand De Morgan's Laws, Universal Gates and Logic Circuits

De Morgan's laws.
1. (A.B)' = A' + B' (break the line, change AND to OR).
2. (A + B)' = A'.B' (break the line, change OR to AND).
Proof for the first: for AB = 00, 01, 10, 11 the left side is 1, 1, 1, 0 and the right side is 1, 1, 1, 0.

Simplifying with De Morgan. Complement each variable and swap the operators over the complemented bracket. Example: ((A.B)' + C)' = (A.B)''.C' = A.B.C' (two NOTs cancel).

Universal gates. A gate is universal if every Boolean function can be built using only that gate.

  • NOT from NAND: NAND(A, A) = A'. (1 gate)
  • AND from NAND: NAND followed by NAND with both inputs tied together. (2 gates)
  • OR from NAND: NAND(A', B') = A + B. (3 gates)
  • XOR from NAND: 4 NAND gates (t = NAND(A, B); NAND(A, t); NAND(B, t); NAND of those two).

NOR is also universal (by duality).

Reading a circuit. Label each gate output; write the expression from the inputs forward. A circuit with an AND gate on A and B, an OR gate on the AND output and C, and a NOT on the final output is F = (A.B + C)'.

Drawing a circuit. Take the expression, build the innermost brackets first, and feed their outputs into the next gate.

Check. Verify the circuit with a truth table for the given input row.

De Morgan's Laws, Universal Gates and Logic Circuits: key facts

De Morgan
  • (A.B)' = A' + B'
  • (A + B)' = A'.B'
  • Break the line, swap AND and OR
Two laws.
From NAND
NOTNAND(A, A)
ANDNAND then NOT
ORNAND(A', B')
XOR4 NAND gates
NAND is universal.
Double NOT
A'' = A | Two bars cancel
Used in simplifying.
Circuit reading
Write each gate output | From inputs to final output
Use brackets for each gate.

How to answer De Morgan's Laws, Universal Gates and Logic Circuits questions

Circuit and simplification questions are both about careful, step-by-step substitution.

  1. 1Mark each gate output with a letter or write it as a bracketed expression.
  2. 2Apply De Morgan to the outermost complement first.
  3. 3Cancel double NOTs and collect terms.
  4. 4For a given input row, substitute 0 and 1 gate by gate.
  5. 5Confirm with a truth table if the question asks you to prove.

De Morgan's Laws, Universal Gates and Logic Circuits in real life

The idea, met in an everyday situation. Answer the question in your own words, then compare with the model answer. The one-line hook is what to remember.

A safety interlock

Suppose a machine starts only when it is NOT the case that (door open AND guard off).

Rewrite this condition without the outer NOT.

Try it first, then show the solutionSolution
  1. Condition: (D.G)' where D = door open, G = guard off.
  2. By De Morgan: D' + G'.

Answer: Starts when the door is closed OR the guard is on: D' + G'.

Memory hook: Not both, means at least one is false.

Tricks to remember De Morgan's Laws, Universal Gates and Logic Circuits

Short memory aids. Say each one aloud once, then use it on a question the same day.

  • Break the line, change the sign

    Splitting the bar swaps AND and OR.

    Use it when: De Morgan.

  • NAND tied is NOT

    Both inputs of a NAND joined to A gives A'.

    Use it when: NOT from NAND.

De Morgan's Laws, Universal Gates and Logic Circuits: solved examples

Ordered from board level to HOTS. Try each one before you open the solution.

Example 1: De Morgan · 1 mark · MCQBoard level

The expression (A + B)' is equal to:
(a) A' + B'
(b) A'.B'
(c) A.B
(d) A' . B

Try it first, then show the solutionSolution
  1. Break the line and change OR to AND.

Answer: (b) A'.B'

Example 2: Prove one law · 3 marks · Short answerBoard level

Verify (A.B)' = A' + B' with a truth table. (3 marks)

Try it first, then show the solutionSolution
  1. AB = 00: (A.B)' = 1; A' + B' = 1 + 1 = 1.
  2. AB = 01: 1 and 1 + 0 = 1. AB = 10: 1 and 0 + 1 = 1. AB = 11: 0 and 0 + 0 = 0.
  3. Both columns read 1, 1, 1, 0.

Answer: Both sides give 1, 1, 1, 0; law verified.

Example 3: Simplify · 4 marks · Short answerHarder board level

Simplify ((A.B)' + C)' and verify it for A = 1, B = 1, C = 0. (4 marks)

Try it first, then show the solutionSolution
  1. Apply De Morgan to the outer bar: ((A.B)')'.C' = A.B.C'.
  2. Check with A = 1, B = 1, C = 0: (A.B)' = 0; 0 + 0 = 0; NOT of it = 1.
  3. A.B.C' = 1.1.1 = 1. Both give 1.

Answer: Result A.B.C'; both forms give 1 for A = 1, B = 1, C = 0.

Example 4: Gates from NAND · 4 marks · Short answerHarder board level

Show how to obtain NOT, AND and OR using only NAND gates and state the number of gates needed for each. (4 marks)

Try it first, then show the solutionSolution
  1. NOT: join both inputs: NAND(A, A) = A'. One gate.
  2. AND: NAND(A, B) followed by a NOT-connected NAND. Two gates.
  3. OR: NOT-connect A and B with one NAND each, then NAND the results: NAND(A', B') = A + B. Three gates.

Answer: NOT 1 gate; AND 2 gates; OR 3 gates.

Example 5: Simplifying a circuit · 5 marks · Short answerHOTS / competency

A circuit gives F = (A.B)'.(A + B). Simplify F using De Morgan's law and name the gate it equals. Verify with a table. (5 marks)

Try it first, then show the solutionSolution
  1. (A.B)' = A' + B', so F = (A' + B').(A + B).
  2. Multiply: A'A + A'B + B'A + B'B = 0 + A'B + AB' + 0.
  3. F = A'B + AB', the XOR gate.
  4. Table: AB = 00: (1).(0) = 0; 01: 1.1 = 1; 10: 1; 11: 0.(1) = 0. Output 0, 1, 1, 0.

Answer: F = A'B + AB' = XOR.

Where students lose marks in De Morgan's Laws, Universal Gates and Logic Circuits

The slips examiners see most often, and what to write instead.

  • Mistake: Changing only the sign

    Splitting the bar but keeping AND.

    Wrong working

    (A.B)' = A'.B'

    Right working

    (A.B)' = A' + B'

    Do this: Break the line and change the sign.

    Usually costs: 1 mark

  • Mistake: Not complementing the variables

    Only swapping AND and OR.

    Wrong working

    (A + B)' = A . B

    Right working

    (A + B)' = A' . B'

    Do this: Each variable is complemented too.

    Usually costs: 1 mark

  • Mistake: Reading a circuit from the output backwards without brackets

    Losing the structure.

    Wrong working

    F = A.B + C'

    Right working

    F = (A.B + C)'

    Do this: Put each gate output in brackets.

    Usually costs: 1 mark

Exam tips

  • Write each De Morgan step on a new line.
  • Cancel double bars explicitly.
  • Give the gate count when a question asks for the number of NAND gates.
  • Verify one input row to show the circuit works.

Practice questions on De Morgan's Laws, Universal Gates and Logic Circuits

Write each answer on paper first. Open the hint only if you are stuck, and the answer only when you have finished.

  1. Q1 · 1 mark · MCQBoard level

    Which gate is universal?
    (a) AND
    (b) OR
    (c) NAND
    (d) XOR

    Hint

    One of NAND or NOR.

    Answer

    (c) NAND

  2. Q2 · 3 marks · Short answerHarder board level

    Write the expression for the circuit: A and B go to an AND gate; its output and C go to an OR gate; the OR output goes to a NOT gate. Evaluate for A = 1, B = 0, C = 0. (3 marks)

    Hint

    F = (A.B + C)'.

    Answer

    F = (A.B + C)'. A.B = 0, 0 + 0 = 0, NOT gives 1. F = 1.

  3. Q3 · 3 marks · Short answerHarder board level

    Simplify (A' + B)' and write the result as a product. Verify for AB = 10. (3 marks)

    Hint

    Break the bar.

    Answer

    (A' + B)' = A''.B' = A.B'. For A = 1, B = 0: A' + B = 0 + 0 = 0, complement 1; A.B' = 1.1 = 1. Both agree.

  4. Q4 · 1 mark · Assertion-reasonHarder board level

    Assertion (A): An XOR gate can be built using four NAND gates.
    Reason (R): NAND is a universal gate.
    (a) Both A and R are true, and R is the correct explanation of A.
    (b) Both A and R are true, but R is not the correct explanation of A.
    (c) A is true, but R is false.
    (d) A is false, but R is true.

    Hint

    Universal means any function.

    Answer

    (a) Both A and R are true, and R is the correct explanation of A.

  5. Q5 · 5 marks · Short answerHOTS / competency

    Use De Morgan's law to show that ((A' + B).C)' = A.B' + C' and verify at ABC = 111. (5 marks)

    Hint

    Break the outer bar.

    Answer

    ((A' + B).C)' = (A' + B)' + C' = A''.B' + C' = A.B' + C'. At A = B = C = 1: A' + B = 1; times C = 1; complement 0. A.B' + C' = 1.0 + 0 = 0. Both give 0.

Test your recall

Answer in your head or on paper first, then open the card. Pulling an answer out of memory makes it stick far better than re-reading.

  1. 1.First law?Show answer

    (A.B)' = A' + B'.

  2. 2.Second law?Show answer

    (A + B)' = A'.B'.

  3. 3.NOT from NAND?Show answer

    Join the two inputs.

  4. 4.Gates needed for OR from NAND?Show answer

    Three.

  5. 5.Double complement?Show answer

    Cancels: A'' = A.

De Morgan's Laws, Universal Gates and Logic Circuits: frequently asked questions

Why is NAND called universal?

Every other gate can be built from NAND alone.

Is NOR also universal?

Yes, by the same argument.

Where are De Morgan's laws used?

To simplify expressions and rewrite circuits using fewer or different types of gates.