Skip to content
GATEiit

GATE EC · Digital Circuits

Boolean algebra

Postulates and theorems of Boolean algebra (absorption, De Morgan, consensus, duality), algebraic simplification, complements, canonical SOP and POS forms with minterms and maxterms, XOR identities and counting Boolean functions.

Before you start

  • Binary numbers →

    Minterm and maxterm indices are the binary values of the input combinations.

  • Propositional logic →

    AND, OR and NOT behave like conjunction, disjunction and negation; truth tables are the same tool.

This topic comes before: Arithmetic circuits, Decoders, Fundamentals of error correction, Hamming codes, CRC, Latches and flip-flops, Logic gates and their static CMOS implementations, Minimization of functions using Boolean identities and Karnaugh map, Multiplexers

Concept notes

1. Postulates and basic theorems

Boolean algebra works on the set {0,1} with OR (+), AND (⋅) and NOT (A‾ or A′). Precedence: NOT, then AND, then OR.

Law OR form AND form
Identity A+0=A A⋅1=A
Null A+1=1 A⋅0=0
Idempotent A+A=A A⋅A=A
Complement A+A‾=1 AA‾=0
Involution A‾‾=A
Absorption A+AB=A A(A+B)=A
Redundant literal A+A‾B=A+B A(A‾+B)=AB
Distributive A+BC=(A+B)(A+C) A(B+C)=AB+AC

The second distributive law, A+BC=(A+B)(A+C), has no counterpart in ordinary algebra and is the one students forget.

Theorems can be proved by algebra or, with few variables, by perfect induction: check every row of the truth table. Two expressions are equal exactly when their truth tables match.

Duality: swap +↔⋅ and 0↔1 (leave variables alone). If an identity holds, its dual also holds. That is why every law above comes in a pair.

ABAB′ABA′BA′B′UOutside both circles:(A + B)′ = A′B′Outside the overlap:(AB)′ = A′ + B′
Venn picture of two variables: the four regions are the minterms $AB$, $A\overline{B}$, $\overline{A}B$, $\overline{A}\,\overline{B}$, and it shows both De Morgan laws.

2. De Morgan's theorems and complements

De Morgan's theorems:

A+B‾=A‾ B‾,AB‾=A‾+B‾

They extend to any number of variables: A+B+C‾=A‾ B‾ C‾.

To complement a function, take the dual and complement every literal. For example

F=AB‾+C  ⇒  F‾=(A‾+B) C‾

Keep the grouping: AB‾+C is really (AB‾)+C, so its dual is (A+B‾)C, not A+B‾C. Put brackets in before swapping.

Dual vs complement: the dual Fd swaps operators only; the complement F‾ also complements literals. They are linked by Fd(A,B,…)=F(A‾,B‾,…)‾.

A function is self-dual if Fd=F. The 3-input majority function AB+BC+CA is self-dual. A self-dual function of n variables is fixed by its values on half the input combinations, so there are 22n−1 of them.

De Morgan also explains gate equivalences: a NAND gate is an OR gate with inverted inputs, and a NOR gate is an AND gate with inverted inputs. NAND and NOR are each universal: any function can be built from NAND gates alone (or NOR gates alone).

3. Algebraic simplification and the consensus theorem

The aim is fewer literals and terms, so the circuit needs fewer gates. Useful moves:

  • Absorption: AB+ABC‾=AB.
  • Combining: AB+AB‾=A.
  • Redundant literal: A+A‾B=A+B.
  • Consensus theorem:

AB+A‾C+BC=AB+A‾C

The term BC is the consensus of AB and A‾C: take the two terms containing A and A‾, and AND the rest. It is redundant, because whenever BC=1 one of the other two terms is already 1. The dual form is (A+B)(A‾+C)(B+C)=(A+B)(A‾+C).

The consensus term, though logically redundant, is sometimes added on purpose to remove a static hazard; that is a circuit issue, not an algebra one.

For more than four variables, or when you need the guaranteed minimum, use a Karnaugh map. In GATE, algebra is usually enough to spot that two options are equal or that an expression collapses to a single literal.

Check by substitution: if two options look alike, try a few input rows (say A=0,B=1,C=0) to rule out wrong ones quickly.

ABCABA′CA′f = AB + A′CNOTANDANDOR
Two-level AND-OR circuit for $f = AB + \overline{A}C$; adding the consensus term $BC$ would not change $f$.

4. Canonical forms: minterms and maxterms

A minterm is an AND of all n variables, each once, true or complemented; it is 1 for exactly one input row. A maxterm is an OR of all n variables; it is 0 for exactly one row.

For row index i (inputs read as a binary number, first variable as MSB):

  • minterm mi: a variable appears complemented where its bit is 0. For A,B,C: m5=AB‾C.
  • maxterm Mi: a variable appears complemented where its bit is 1. M5=A‾+B+C‾, and Mi=mi‾.

Canonical SOP: F=∑m(rows where F=1). Canonical POS: F=∏M(rows where F=0). The two index lists are complementary, and F‾=∑m(rows where F=0).

To expand a term to canonical form, AND it with (X+X‾) for each missing variable X. A product term with k of n variables covers 2n−k minterms.

Counting results:

Quantity for n variables Value
Rows of the truth table 2n
Distinct Boolean functions 22n
Self-dual functions 22n−1

So there are 16 functions of 2 variables and 256 of 3 variables.

5. XOR and XNOR

Exclusive-OR: A⊕B=AB‾+A‾B, which is 1 when the inputs differ. XNOR: A⊙B=A⊕B‾=AB+A‾ B‾, which is 1 when they are equal.

Identities:

  • A⊕0=A, A⊕1=A‾, A⊕A=0, A⊕A‾=1.
  • Commutative and associative: (A⊕B)⊕C=A⊕(B⊕C).
  • A‾⊕B=A⊕B‾=A⊕B‾.
  • A(B⊕C)=AB⊕AC (AND distributes over XOR, but OR does not).
  • If A⊕B=C then A⊕C=B.

A chain A1⊕A2⊕⋯⊕An is the odd parity function: 1 when an odd number of inputs are 1. For three variables, A⊕B⊕C=∑m(1,2,4,7) and its complement is ∑m(0,3,5,6).

For three variables A⊕B⊕C=A⊙B⊙C, but for two variables XOR and XNOR are complements. In general, an XNOR chain of an odd number of variables equals the XOR chain.

XOR functions do not simplify on a K-map (their 1s form a checkerboard), so recognising the parity pattern in a minterm list saves time.

Formulas to remember

De Morgan's theorems
A+B‾=A‾ B‾,AB‾=A‾+B‾
Absorption
A+AB=A,A(A+B)=A
Redundant literal
A+A‾B=A+B,A(A‾+B)=AB
Second distributive law
A+BC=(A+B)(A+C)
Consensus theorem
AB+A‾C+BC=AB+A‾C
Dual and complement
Fd(A,B,…)=F(A‾,B‾,…)‾
XOR
A⊕B=AB‾+A‾B
Number of functions
22n functions,22n−1 self-dual functions

Common mistakes

  • Writing the complement of A + B as A′ + B′; De Morgan changes the operator as well: (A + B)′ = A′B′.
  • Confusing the dual with the complement; the dual swaps + and · but does not complement the literals.
  • Dropping brackets before taking a dual, so that AB + C becomes A + BC instead of (A + B)C.
  • Forgetting the second distributive law A + BC = (A + B)(A + C), which has no counterpart in ordinary algebra.
  • Using the wrong polarity for maxterms; in M_i a variable is complemented where its bit is 1.
  • Assuming OR distributes over XOR; only AND does: A(B ⊕ C) = AB ⊕ AC.

Worked examples

Try each step yourself, then reveal the working.

Example 1: Simplify a product of sums

numerical

Simplify F=(A+B)(A+B‾)(A‾+C).

  1. Step 1: Combine the first two factors.

    Try it on paper first.

Example 2: Canonical SOP and POS

numerical

Write F(A,B,C)=A+B‾C in canonical SOP and canonical POS form.

  1. Step 1: Find the rows covered by $A$.

    Try it on paper first.

Example 3: Complement with De Morgan

numerical

Find F‾ for F=A+B‾C in simplest SOP form.

  1. Step 1: Apply De Morgan to the OR.

    Try it on paper first.

Example 4: Is the majority function self-dual?

conceptual

Show that F=AB+BC+CA is self-dual.

  1. Step 1: Write the dual.

    Try it on paper first.

Previous year questions

2 official GATE EC questions on this topic, newest first.

Topic test

10 questions: up to 2 official PYQs and original practice questions, with GATE marking (MCQ wrong answers lose marks). Score 60% or more to pass. A new set is drawn each time.

Mark as mastered

Loading your progress…

My revision notes

Notes written by the GATEiit team against the official GATE EC syllabus; being checked by a reviewer. Updated 2026-11-28. Spotted a mistake? Use Report an issue on any question, or contact us.