3 Simplification Of Boolean Functions

Digital Logic ยท Unit 3 ยท 5 hrs

Simplification of Boolean Functions

Exam-focused notes for Simplification of Boolean Functions (Digital Logic, CSC116): what the TU syllabus asks and how it has actually been tested, with 8 solved past questions from this unit.

Simplification of Boolean Functions in short

This chapter covers the Karnaugh map, a graphical tool for reducing a Boolean function to its minimum number of terms and literals, along with its use for product-of-sums forms, its translation into NAND/NOR-only circuits, its handling of don't-care conditions, and the tabulation method used when a function has too many variables to map by eye.

Simplification of Boolean Functions: notes

K-map

A Karnaugh map (K-map) is a two-dimensional grid representation of a truth table, with one square for every minterm (or maxterm) of the function. A map of $n$ variables therefore has $2^n$ squares, and adjacent squares are arranged, using a Gray code ordering along each axis, so that any two physically adjacent squares (including squares that wrap around from one edge of the map to the opposite edge, since the map is considered cylindrical) differ in exactly one variable. A 1 is written in every square whose minterm belongs to the function; the remaining squares are left as 0.

Simplification proceeds by grouping adjacent 1s into rectangular blocks and reading off, for each block, only the variables that stay constant across it:

  • Every square containing a 1 must be included in at least one group.
  • A square may be included in more than one group if that produces a larger or more useful grouping.
  • Groups must contain $2^k$ adjacent squares (1, 2, 4, 8, 16, ...); a group of $2^k$ squares in an $n$-variable map removes $k$ literals from the term it represents.
  • Groups should be made as large as possible, and as few groups as possible should be used to cover every 1, since this minimizes the number of product terms and the number of literals per term.
  • The Boolean expression should be in canonical (minterm or maxterm) form before the map is drawn.

Two and Three variable maps

A two-variable K-map has $2^2=4$ squares, one for each combination of $A$ and $B$:

$B'$$B$
$A'$$m_0$$m_1$
$A$$m_2$$m_3$

For example, $F(A,B) = \sum m(1,2,3)$ places 1s in $m_1, m_2, m_3$. Grouping $m_1$ with $m_3$ (both have $B=1$) gives the term $B$; grouping $m_2$ with $m_3$ (both have $A=1$) gives the term $A$. Together these two groups cover every 1, so $F = A+B$.

A three-variable K-map has $2^3=8$ squares, with rows for $A$ and columns for $BC$ arranged in Gray code order ($00, 01, 11, 10$) so that consecutive columns, and the first and last column, differ in only one bit:

$BC{=}00$$01$$11$$10$
$A'$$m_0$$m_1$$m_3$$m_2$
$A$$m_4$$m_5$$m_7$$m_6$

For example, $F(A,B,C) = \sum m(0,1,4,5)$ places 1s in $m_0, m_1, m_4, m_5$, which occupy the two leftmost columns ($BC=00$ and $BC=01$) in both rows: a single group of four squares, spanning both values of $A$ and both values of $C$ but always with $B=0$. The simplified function is therefore $F = B'$.

What this unit covers

  • K-map
  • Two and Three variable maps
  • Four variable maps
  • product of sum simplification
  • NAND and NOR implementation
  • Don't Care conditions
  • Determinant and selection of Prime Implicants

K-map

2081 ยท 10 marks

De-Morgan's Law and Boolean Function Simplification

Show solved answer

De-Morgan's Law and K-Map Simplification

Part 1: De-Morgan's Law

De-Morgan's Law relates the complement of a compound Boolean expression to the complements of its parts.

Theorem 1: $\overline{A + B} = \bar{A} \cdot \bar{B}$ The complement of a sum equals the product of the complements.

Theorem 2: $\overline{A \cdot B} = \bar{A} + \bar{B}$ The complement of a product equals the sum of the complements.

Truth-table verification:

AB$\overline{A+B}$$\bar A\bar B$$\overline{A\cdot B}$$\bar A+\bar B$
001111
010011
100011
110000

Columns match, so both theorems hold.


Part 2: K-Map Simplification

Given data

  • $F(P,Q,R,S)=\prod(0,1,4,5,11,14,15)$ โ†’ maxterms (cells = 0)
  • $d(P,Q,R,S)=\sum(2,3,7,8,9,13)$ โ†’ don't cares (X)
  • Remaining cells = 1: all ${0..15}$ minus maxterms minus don't cares
    • $F=1$ at ${6, 10, 12}$

K-map (rows PQ, cols RS)

Minterm positions:

        RS=00  01   11   10
PQ=00 |  m0 | m1 | m3 | m2 |
PQ=01 |  m4 | m5 | m7 | m6 |
PQ=11 | m12 |m13 |m15 |m14 |
PQ=10 |  m8 | m9 |m11 |m10 |

Filled values:

        RS=00  01   11   10
PQ=00 |  0  | 0  | X  | X  |
PQ=01 |  0  | 0  | X  | 1  |
PQ=11 |  1  | X  | 0  | 0  |
PQ=10 |  X  | X  | X  | 1  |

Note: $m_{11}$ is a don't care (it appears in the d-set), so it must not be entered as a 0.


Part 2A: SOP (group 1s using X's)

Ones at: m6, m10, m12. Don't cares available: m2, m3, m7, m8, m9, m11, m13.

Group 1 (quad): m12, m13, m8, m9

  • $m8=1000,\ m9=1001,\ m12=1100,\ m13=1101$
  • Constant: $P=1,\ R=0$. Q and S vary.
  • Term: $P\bar R$

Group 2 (quad): m2, m3, m6, m7

  • $m2=0010,\ m3=0011,\ m6=0110,\ m7=0111$
  • Constant: $P=0,\ R=1$. Q and S vary.
  • Term: $\bar P R$

Check coverage of the 1's:

  • m6 โ†’ Group 2 โœ“
  • m12 โ†’ Group 1 โœ“
  • m10 โ†’ $1010$: not in Group 1 (needs R=0) nor Group 2 (needs P=0). NOT covered.

Cover m10 = $1010$ ($P=1,Q=0,R=1,S=0$). Available neighbours:

  • m11 ($1011$, X) โ†’ pair m10,m11: $P=1,Q=0,R=1$ โ†’ $P\bar Q R$
  • m8 ($1000$, X) โ†’ pair m10,m8: $P=1,Q=0,S=0$ โ†’ $P\bar Q\bar S$
  • Extend to quad m8,m9,m10,m11 (all X except m10): $P=1,Q=0$ โ†’ $P\bar Q$ (best, largest group).

So use quad $m8,m9,m10,m11 = P\bar Q$, which also covers m10.

Final SOP: $$F = P\bar R + \bar P R + P\bar Q$$

(Alternatively $P\bar R + \bar P R + P\bar Q R$ if the m8/m9 quad is not reused, but $P\bar Q$ is the minimal literal choice using don't cares.)

Minimal form: $$\boxed{F_{SOP} = \bar P R + P\bar R + P\bar Q}$$


Part 2B: POS (group 0s using X's)

Zeros at maxterms: m0, m1, m4, m5, m11(? no), actual zero cells = ${0,1,4,5,11,14,15}$. Don't cares: ${2,3,7,8,9,13}$.

Zero cells: m0, m1, m4, m5, m11, m14, m15.

Group A (quad): m0, m1, m4, m5

  • $0000,0001,0100,0101$: $P=0,R=0$ โ†’ $\bar P\bar R$
  • Maxterm factor: $(P+R)$

Group B (quad): m11, m15, m14, and pair up):

  • m14=$1110$, m15=$1111$, m11=$1011$
  • m14,m15 pair: $P=1,Q=1,R=1$ โ†’ extend with m10(1010, is a 1 โ†’ cannot), with m13(1101,X) no.
  • Quad m15,m14,m11,m10? m10 is a 1, so no.
  • Use m14,m15 + m6,m7? m6 is 1. No.

Group the zeros:

  • Group B: m14, m15 โ†’ $P=1,Q=1,R=1$; S varies โ†’ $PQR$ โ†’ factor $(\bar P+\bar Q+\bar R)$. Extend with X's: m14,m15,m10?(1), m6,m7(m6=1). Only m13(X) with m15,m14... m13=1101 differs in two bits. So m14,m15 stays a pair.
  • Group C: m11 = $1011$ โ†’ pair with X's: m9(1001,X)โ†’ m9,m11: $P=1,Q=0,S=1$ โ†’ extend m9,m11,m13,m15: m13=1101(X), m15=1111(zero) all valid โ†’ quad $P=1,S=1$ โ†’ $PS$ โ†’ factor $(\bar P+\bar S)$. This quad {m9,m11,m13,m15} covers zero m11 and m15.

Reassess minimal cover of zeros ${0,1,4,5,11,14,15}$:

  • Group A $(P+R)$ covers 0,1,4,5.
  • Quad {9,11,13,15} = $PS$ covers 11,15 โ†’ factor $(\bar P+\bar S)$.
  • m14 = $1110$ remains. Pair m14 with m15(zero)? gives m14,m15 โ†’ $PQR$; or m14 with m10(1),m6(1) none. Use m14,m15 โ†’ $(\bar P+\bar Q+\bar R)$, or extend m14,m15,m13(X),m12(1 โ†’ no). Pair m14,m15,m11,m10? m10=1. So m14 covered by pair m14,m15 โ†’ factor $(\bar P+\bar Q+\bar R)$.

Final POS: $$\boxed{F_{POS} = (P+R)(\bar P+\bar S)(\bar P+\bar Q+\bar R)}$$


Summary

  • SOP: $F = \bar P R + P\bar R + P\bar Q$
  • POS: $F = (P+R)(\bar P+\bar S)(\bar P+\bar Q+\bar R)$

Common mistake: marking $m_{11}$ as a 0 in the K-map when it is a don't care in the given d-set. Treating it correctly gives the full SOP and POS results above.

Open this answer on its own page โ†’

2075 ยท 5 marks

Reduce the following function using k-map. F=B'D+A'BC'+AB'C+ABC' [5]

Function of 4 variables A, B, C, D: $$F = B'D + A'BC' + AB'C + ABC'$$ Order: A B C D. B'D (B=0, D=1; A,C free): - 0001 = m1, 0011 = m3, 1001 = m9, 1011 = m11 A'BC' (A=0, B=1, C=0; D free): - 0100 = m4, 0101 = m5 AB'C (A=1, B=0, C=1; D free): - 1010 = m10, 1011 = m11 ABC' (A=1, B=1, C=0; D free): ...

Open this answer on its own page โ†’

Four variable maps

2081 ยท 5 marks

Simplify $F(A,B,C,D)=\sum(1,3,4,6,9,11,12,14)$ and realize the equation using NOR gates only. [5]

Show solved answer

Simplification of F(A,B,C,D) = ฮฃ(1,3,4,6,9,11,12,14) and NOR Realization

Given

  • Function: $F(A,B,C,D) = \sum(1,3,4,6,9,11,12,14)$
  • 4 variables: A (MSB), B, C, D (LSB)
  • Requirement: simplify, then realize using NOR gates only

Step 2: K-Map Plot

Minterms in binary (ABCD):

  • m1 = 0001, m3 = 0011, m4 = 0100, m6 = 0110
  • m9 = 1001, m11 = 1011, m12 = 1100, m14 = 1110
CD\AB00011110
0001 (m4)1 (m12)0
011 (m1)001 (m9)
111 (m3)001 (m11)
1001 (m6)1 (m14)0

Verify placement (columns are AB, rows are CD):

  • m1 (A=0,B=0,C=0,D=1): AB=00, CD=01 โœ“
  • m3 (0,0,1,1): AB=00, CD=11 โœ“
  • m4 (0,1,0,0): AB=01, CD=00 โœ“
  • m6 (0,1,1,0): AB=01, CD=10 โœ“
  • m9 (1,0,0,1): AB=10, CD=01 โœ“
  • m11 (1,0,1,1): AB=10, CD=11 โœ“
  • m12 (1,1,0,0): AB=11, CD=00 โœ“
  • m14 (1,1,1,0): AB=11, CD=10 โœ“

Step 3: Group the 1s

Group 1 (Quad): m1, m3, m9, m11 โ†’ cells with B=0, D=1

  • A varies (0,1), C varies (0,1), B=0 fixed, D=1 fixed โ†’ B'D

Group 2 (Quad): m4, m6, m12, m14 โ†’ cells with B=1, D=0

  • A varies, C varies, B=1 fixed, D=0 fixed โ†’ BD'

Step 4: Simplified SOP

$$\boxed{F = B'D + BD' = B \oplus D}$$

Step 5: Convert for NOR Realization

NOR gates naturally give POS form. Group the 0s to find $F'$.

Zeros at: m0, m2, m5, m7, m8, m10, m13, m15

Group A (0s): m0, m2, m8, m10 โ†’ B=0, D=0 โ†’ B'D' Group B (0s): m5, m7, m13, m15 โ†’ B=1, D=1 โ†’ BD

$$F' = B'D' + BD$$

Complement to get POS:

$$F = (F')' = (B'D' + BD)' = (B'D')'\cdot(BD)'$$

$$F = (B + D)(B' + D')$$

Step 6: NOR Gate Implementation

For a POS expression, standard NOR realization uses a NOR-NOR structure. We write each sum term as a NOR (inverted OR) and combine.

Note the identity: $(X)(Y) = \overline{\overline{X} + \overline{Y}} = \overline{,\overline{X}\ \text{NOR}\ \overline{Y},}$... rather, express directly:

$$F = (B+D)(B'+D') = \overline{\overline{(B+D)(B'+D')}} = \overline{\ \overline{(B+D)} + \overline{(B'+D')}\ }$$

So: $$F = \overline{(B \text{ NOR } D) + (B' \text{ NOR } D')} = (B \text{ NOR } D)\ \text{NOR}\ (B' \text{ NOR } D')$$

Gate list (NOR only):

GateFunctionOutput
G1 (inverter)B NOR B$B'$
G2 (inverter)D NOR D$D'$
G3B NOR D$\overline{B+D}$
G4B' NOR D'$\overline{B'+D'}$
G5G3 NOR G4$\overline{\overline{(B+D)}+\overline{(B'+D')}} = (B+D)(B'+D') = F$

Circuit sketch:

B --------+------[G3: NOR]---+
D --------|--+---            |
          |  |               +--[G5: NOR]--> F
B --[G1:NOR B,B]=B'--[G4:NOR]--+
D --[G2:NOR D,D]=D'--

Final Answer

$$\boxed{F = B'D + BD' = B \oplus D = (B+D)(B'+D')}$$

Realized with 5 NOR gates: 2 as inverters (for B', D'), 2 for the sum terms, 1 for the final combination.

Open this answer on its own page โ†’

2079 ยท 5 marks

Minimize the following Boolean function using K-map $F(A, B, C, D) = \Sigma m(0,1,2,5,7,8,9,10,13,15)$. [5]

Minterms with value 1: 0, 1, 2, 5, 7, 8, 9, 10, 13, 15 Rows = AB, Columns = CD (Gray code order): Verify 1s: m0โœ“ m1โœ“ m2โœ“ m5โœ“ m7โœ“ m8โœ“ m9โœ“ m10โœ“ m13โœ“ m15โœ“ (10 ones) Group 1 (Quad): m{0,1,8,9} - AB = 00 and 10 (A varies), B = 0; CD = 00 and 01 (D varies), C = 0 - Constant: $B=0, C=0$ โ†’ $B'C'$ Group 2...

Open this answer on its own page โ†’

2078 ยท 5 marks

Minimize the following Boolean function using K-map. $F(A,B,C,D)=\sum(0,1,3,5,7,8,9,11,13,15)$ [5]

  • Function: $F(A,B,C,D) = \sum(0,1,3,5,7,8,9,11,13,15)$ - Minterms with value 1: {0, 1, 3, 5, 7, 8, 9, 11, 13, 15} - All other cells (2, 4, 6, 10, 12, 14) = 0 Rows = AB (00, 01, 11, 10), Columns = CD (00, 01, 11, 10). Minterm-to-cell mapping (row AB, col CD): AB\CD 00 01 11 10 -------------------...
Open this answer on its own page โ†’

Don't Care conditions

2080 ยท 5 marks

If $f(P,Q,R,S)=\sum(3,4,7,8,14)$, $d(P,Q,R,S)=\sum(1,6,9,13)$ Simplify it using K-map and design circuit using minimum number of NAND gates. [5]

  • $f(P,Q,R,S) = \sum(3,4,7,8,14)$ (required minterms) - Don't cares: $d(P,Q,R,S) = \sum(1,6,9,13)$ - P is MSB, S is LSB $$ \begin{array}{ccccc} & RS=00 & 01 & 11 & 10 \ \hline PQ=00 & 0(m0) & X(m1) & 1(m3) & 0(m2) \ 01 & 1(m4) & 0(m5) & 1(m7) & X(m6) \ 11 & 0(m12) & X(m13) & 0(m15) & 1(m14) \...
Open this answer on its own page โ†’

product of sum simplification

2078 ยท 5 marks

Express the Boolean function F = x+yz as a product of max-terms. [5]

Given data: - Boolean function: $F = x + yz$ - Variables: $x, y, z$ (3 variables, so $2^3 = 8$ combinations) - Required form: Product of max-terms (POS canonical form) --- Evaluate $F = x + yz$ for all 8 combinations: Row x y z yz F = x + yz ------------------------------ 0 0 0 0 0 0 1 0 0 1 0 0 ...

Open this answer on its own page โ†’

NAND and NOR implementation

2077 ยท 5 marks

Simplify the following function and implement them with two level NOR gate circuit, $F(w, x, y, z) = wx' + y'z' + w'yz'$. [5]

$$F(w,x,y,z) = wx' + y'z' + w'yz'$$ Term $wx'$ ($w=1, x=0$, y,z any): - $1000=8,\ 1001=9,\ 1010=10,\ 1011=11$ Term $y'z'$ ($y=0, z=0$, w,x any): - $0000=0,\ 0100=4,\ 1000=8,\ 1100=12$ Term $w'yz'$ ($w=0, y=1, z=0$, x any): - $0010=2,\ 0110=6$ Combined: $$F = \sum m(0, 2, 4, 6, 8, 9, 10, 11, 12)$$...

Open this answer on its own page โ†’