Skip to content
GATEiit

GATE CSE · Digital Logic

Boolean algebra and minimization: algebraic technique, Karnaugh map and tabular method

Boolean algebra laws and theorems, canonical SOP and POS forms, and minimising functions by algebra, by Karnaugh maps (with don't cares) and by the Quine–McCluskey tabular method, including prime and essential prime implicants.

Before you start

  • Propositional logic →

    AND, OR, NOT and their laws are the same as conjunction, disjunction and negation.

  • Binary numbers

    Minterm numbers are the binary values of the input combinations.

This topic comes before: Data link layer: error detection, medium access control and Ethernet, Design of arithmetic and logic unit (ALU), Design of combinational and sequential circuits, Number representation and arithmetic (fixed and floating point), Propositional and first-order logic

Concept notes

1. Boolean algebra: laws and theorems

Variables take values 0 and 1. Write A′ (or Aˉ) for NOT, AB for AND, A+B for OR.

Law OR form AND form
Identity A+0=A A⋅1=A
Null A+1=1 A⋅0=0
Idempotent A+A=A AA=A
Complement A+A′=1 AA′=0
Absorption A+AB=A A(A+B)=A
De Morgan (A+B)′=A′B′ (AB)′=A′+B′
Distributive A+BC=(A+B)(A+C) A(B+C)=AB+AC

Two more that simplify fast:

  • A+A′B=A+B and A(A′+B)=AB.
  • Consensus: AB+A′C+BC=AB+A′C. The term BC is redundant. Dual: (A+B)(A′+C)(B+C)=(A+B)(A′+C).

Duality: swap + with ⋅ and 0 with 1 (leave variables and complements alone). Every identity stays true under duality. The dual of A+BC is A(B+C). A function equal to its own dual is self-dual.

XOR: A⊕B=A′B+AB′; A⊕A=0, A⊕1=A′, and XOR is associative. XNOR is its complement.

Counting: with n variables there are 2n rows in the truth table and 22n distinct Boolean functions; 22n−1 of them are self-dual.

Universal gates: NAND alone and NOR alone can build NOT, AND and OR, so each is functionally complete. So are {AND,NOT} and {OR,NOT}, but not {AND,OR} (it cannot make NOT).

2. Canonical forms: minterms and maxterms

A minterm is an AND of all n variables, each plain or complemented; it is 1 for exactly one input row. Minterm mi is numbered by the row's binary value: for A,B,C, m5=AB′C (row 101).

A maxterm is an OR of all n variables; it is 0 for exactly one row. M5=A′+B+C′ (complement the variables that are 1 in the row).

Note Mi=mi′.

Canonical SOP (sum of minterms) lists the rows where F=1: F=∑m(1,3,5). Canonical POS (product of maxterms) lists the rows where F=0: the same F=∏M(0,2,4,6,7).

The two lists are complementary: together they contain every index from 0 to 2n−1 exactly once. And F′=∑m(indices missing from F).

Expanding a term to minterms: a product term with k missing variables covers 2k minterms. With A,B,C, the term A covers m4,m5,m6,m7.

Minimal forms. A minimal SOP has the fewest product terms, and among those the fewest literals. A minimal POS is found the same way by grouping the 0s (giving F′ in SOP form) and applying De Morgan.

Form Built from Lists rows where
∑m(… ) minterms F=1
∏M(… ) maxterms F=0

Two-level AND–OR (SOP) maps directly to NAND–NAND, and OR–AND (POS) to NOR–NOR.

3. Karnaugh maps

A Karnaugh map (K-map) arranges the truth table so that neighbouring cells differ in exactly one variable. Rows and columns follow Gray code order 00,01,11,10, and the map wraps around: the left edge touches the right edge, the top touches the bottom, and the four corners are adjacent.

Grouping rules (for SOP, group the 1s):

  1. Groups are rectangles of 1,2,4,8,… cells (powers of 2).
  2. Make each group as large as possible; a group of 2k cells removes k variables.
  3. Use as few groups as possible to cover every 1. Overlaps are allowed.
  4. Read a group's term from the variables that stay constant across it.

Implicants:

  • An implicant is any valid group of 1s.
  • A prime implicant (PI) is a group that cannot be enlarged.
  • An essential prime implicant (EPI) is a PI that covers some 1 no other PI covers. Every minimal SOP contains all EPIs.

Method: circle all PIs, take the EPIs, then cover any remaining 1s with as few extra PIs as possible.

Don't cares (d or X): input rows that never occur, or whose output does not matter. Treat each as 1 if it helps make a bigger group, otherwise as 0. Never make a group of only don't cares.

For POS, group the 0s to get F′ as an SOP, then complement with De Morgan.

AB \ CD 00011110 00011110 10010312041517060121131150141809011110 solid: BD (5, 7, 13, 15) dashed: B'D' (corners 0, 2, 8, 10) F = B'D' + BD
4-variable K-map for $F = \sum m(0, 2, 5, 7, 8, 10, 13, 15)$. The four corners are adjacent, so they form one group $B'D'$; the centre square is $BD$.

4. The tabular (Quine–McCluskey) method

The Quine–McCluskey method does the K-map's job systematically, and works for any number of variables.

Step 1: find all prime implicants.

  1. Write each minterm (and each don't care) in binary and group them by the number of 1s.
  2. Compare each term with every term in the next group. If two differ in exactly one bit, combine them, writing − in that position (for example 0101 and 0111 give 01−1). Tick both.
  3. Repeat on the new list: combine terms whose − positions match and that differ in one other bit.
  4. Terms never ticked are the prime implicants.

Step 2: the prime implicant chart.

  1. Rows are PIs; columns are the minterms (not the don't cares).
  2. A column with a single mark identifies an essential PI. Take it and delete the columns it covers.
  3. Remove dominated rows and columns, and repeat.
  4. If no essential PI remains and columns are still uncovered, the chart is cyclic; choose by trial or by Petrick's method (write the covering condition as a product of sums and multiply out).
Method Best for Weakness
Algebra small expressions, spotting identities no proof of minimality
K-map up to 4 (at most 5) variables hard to see groups beyond that
Quine–McCluskey any number of variables, programs long by hand

A function can have more than one minimal SOP, but the number of literals in a minimal SOP is fixed.

Formulas to remember

De Morgan's laws
(A+B)′=A′B′,(AB)′=A′+B′
Absorption and redundancy
A+AB=A,A+A′B=A+B
Consensus theorem
AB+A′C+BC=AB+A′C
Distributive (OR over AND)
A+BC=(A+B)(A+C)
XOR
A⊕B=A′B+AB′
Number of Boolean functionsn input variables
22n
Number of self-dual functions
22n−1
Group size and literalsIn an n-variable K-map
group of 2k cells⇒n−k literals

Common mistakes

  • Ordering K-map rows and columns as 00, 01, 10, 11 instead of the Gray code 00, 01, 11, 10.
  • Missing wrap-around groups, especially the four corners of a 4-variable map.
  • Making a group of only don't cares, or forcing every don't care to 1.
  • Writing the dual by complementing variables; duality swaps only + with · and 0 with 1.
  • Listing maxterm indices for the rows where F = 1; Π M lists the rows where F = 0.
  • Assuming the minimal SOP is unique; when the PI chart is cyclic there can be several, with the same literal count.

Worked examples

Try each step yourself, then reveal the working.

Example 1: Algebraic simplification with consensus

numerical

Simplify F=AB+A′C+BC+AB′C.

  1. Step 1: Look for a consensus term.

    Try it on paper first.

Example 2: A K-map with wrap-around groups

numerical

Minimise F(A,B,C,D)=∑m(0,2,5,7,8,10,13,15).

  1. Step 1: Place the 1s on the map.

    Try it on paper first.

Example 3: Using don't cares

numerical

Minimise F(A,B,C,D)=∑m(1,3,7,11,15)+d(0,2,5).

  1. Step 1: Find the group for column CD = 11.

    Try it on paper first.

Example 4: A cyclic prime implicant chart

conceptual

For F(A,B,C)=∑m(0,1,2,5,6,7), list the prime implicants, find the essential ones, and give a minimal SOP.

  1. Step 1: Combine adjacent minterms (Quine–McCluskey step 1).

    Try it on paper first.

Previous year questions

24 official GATE CSE questions on this topic, newest first.

Practise these 24 PYQs →

Topic test

10 questions: up to 4 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 CSE syllabus; being checked by a reviewer. Updated 2026-11-21. Spotted a mistake? Use Report an issue on any question, or contact us.