MCS-212 · Block 1 Unit 3

Boolean Algebra and Circuits

Section 5 of 6

Block 1 · Unit 3Boolean Algebra and Circuits14 min · Section 5 of 6

3.5From a function to an expression: DNF and CNF

Covers IGNOU MCS-212 §3.4 (Example 10, remark on DNF/CNF, E12–E14)

So far we went from an expression to its table. Circuit design needs the opposite: we know what output we want for each input (the table), and we need an expression — and hence a circuit — that produces it. Two standard recipes always work.

Disjunctive normal form (from the 1-rows)

Recipe (DNF):

  1. Find every row where f=1f = 1.
  2. For each such row, write the AND of all variables, putting ′' on each variable whose value in that row is 0.
  3. Join these minterms with OR.

Conjunctive normal form (from the 0-rows)

Recipe (CNF):

  1. Find every row where f=0f = 0.
  2. For each such row, write the OR of all variables, putting ′' on each variable whose value in that row is 1 (so that the maxterm is 0 exactly in that row).
  3. Join these maxterms with AND.
DNFCNF
Built from rows wheref=1f = 1f=0f = 0
Each termAND of literals (minterm)OR of literals (maxterm)
Complement a variable when its value is01
Terms joined byORAND
Shorter whenfew 1sfew 0s

Key takeaways

  • DNF: one minterm per row with f=1f = 1; complement the variables that are 0; join with OR.
  • CNF: one maxterm per row with f=0f = 0; complement the variables that are 1; join with AND.
  • Every Boolean function has both forms, so every function can be built from AND, OR, NOT gates.
  • Pick the form with fewer terms, then simplify further with the laws.

Practice questions

Answer on paper first, then check. The explanation matters more than the letter you chose.

Question 1 · multiple choice

Which minterm corresponds to the row x1=1x_1 = 1, x2=0x_2 = 0, x3=1x_3 = 1?

Show answer

Answer: B. x1∧x2′∧x3x_1 \land x_2' \land x_3

In a minterm, complement the variables that are 0 (x2x_2) and join with AND. Option 3 is the maxterm for the same row, which is used in CNF.

Question 2 · multiple choice

Which maxterm is 0 exactly at the input (x1,x2)=(1,0)(x_1, x_2) = (1, 0)?

Show answer

Answer: C. x1′∨x2x_1' \lor x_2

x1′∨x2x_1' \lor x_2 at (1,0)(1, 0) is 0∨0=00 \lor 0 = 0, and it is 1 at every other input. Option 1 is the study material’s E13 answer; it is 0 at (0,0)(0, 0) instead.

Question 3 · multiple choice

A function of 3 variables is 1 in seven rows and 0 in one row. Which form gives the shorter expression?

Show answer

Answer: D. CNF, with one maxterm

CNF uses one maxterm per 0-row, so it has just one term. Option 1 is correct but much longer.

Question 4 · multiple choice

f(x1,x2)f(x_1, x_2) is 1 only at (0,1)(0, 1) and (1,0)(1, 0). What is its DNF?

Show answer

Answer: A. (x1′∧x2)∨(x1∧x2′)(x_1' \land x_2) \lor (x_1 \land x_2')

One minterm per 1-row: (0,1)→x1′∧x2(0,1) \to x_1' \land x_2 and (1,0)→x1∧x2′(1,0) \to x_1 \land x_2' — this is XOR. Option 4 is also 1 at (1,1)(1, 1), where f=0f = 0.

Question 5 · multiple choice

In a DNF, how are the minterms joined?

Show answer

Answer: C. With OR

DNF is an OR (“disjunction”) of ANDs. Joining minterms with AND (as in the printed answer to E14(a)) gives 0 almost everywhere.

Question 6 · short answer

Find the CNF of the function gg that is 0 exactly at (x1,x2,x3)=(1,0,1)(x_1, x_2, x_3) = (1, 0, 1), (0,1,1)(0, 1, 1) and (0,1,0)(0, 1, 0), and check one maxterm.

Show worked answer

One maxterm per 0-row, complementing the variables that are 1: (1,0,1)→x1′∨x2∨x3′(1,0,1) \to x_1' \lor x_2 \lor x_3'; (0,1,1)→x1∨x2′∨x3′(0,1,1) \to x_1 \lor x_2' \lor x_3'; (0,1,0)→x1∨x2′∨x3(0,1,0) \to x_1 \lor x_2' \lor x_3. CNF: g=(x1′∨x2∨x3′)∧(x1∨x2′∨x3′)∧(x1∨x2′∨x3)g = (x_1' \lor x_2 \lor x_3') \land (x_1 \lor x_2' \lor x_3') \land (x_1 \lor x_2' \lor x_3). Check the first maxterm at (1,0,1)(1,0,1): 0∨0∨0=00 \lor 0 \lor 0 = 0, and at any other input at least one literal is 1.

↑ ↓ move↵ openTab switch type