Chapter_2_and_3_Boolean_Algebra_and_Logic Simplification
Chapter_2_and_3_Boolean_Algebra_and_Logic Simplification
2025
Algebra
• What is an algebra?
➢ Set of elements
➢ Set of operators
➢ Axioms or postulates
• Why is it important?
o Operator: +, –, *
• Boolean Algebra: a sort of algebra which used to define or govern the rule of
computation in logical operations. 2
Representation mechanisms of Boolean Algebra
• A Boolean algebra can be represented in one for the following means:
Y F
Z
Sample logic diagram
3
Binary Values and Variables
• Recall that the two binary values have different names:
o True/False
o On/Off
o Yes/No
o 1/0
o A, B,C X, Y, Z, … etc.
4
Logical Operations
• The three basic logical operations are:
o AND
o OR
o NOT
5
Truth Tables
• Tabular listing of the values of a function for all
possible combinations of values on its arguments
• Example: Truth tables for the basic logic operations:
AND OR NOT
X Y Z = X·Y X Y Z = X+Y X Z =X
0 0 0 0 0 0 0 1
0 1 0 0 1 1 1 0
1 0 0 1 0 1
1 1 1 1 1 1
6
Examples
Truth Table
Equation XYZ F = X + Y ×Z
000 0
F = X +Y Z
001 1
010 0
Logic Diagram
011 0
X
100 1
Y F 101 1
110 1
Z
111 1
X Y Z XY Y YZ F=XY+YZ
0 0 0 0 1 0 0
0 0 1 0 1 1 1
0 1 0 0 0 0 0
0 1 1 0 0 0 0
1 0 0 0 1 0 0
1 0 1 0 1 1 1
1 1 0 1 0 0 1
1 1 1 1 0 0 1
8
Basic Identities of Boolean Algebra
1. x + 0 = x
2. x · 0 = 0
3. x + 1 = 1
4. x · 1 = x
5. x + x = x
6. x · x = x
7. x + x’ = 1
8. x · x’ = 0
9. (X’)’ = X
9
Fundamental Theorems
1. Idempotency
• 𝒂+𝒂=𝒂 𝒂. 𝒂 = 𝒂
2. Null elements for + and .
• a+1=1 a.0 = 0
• 3. Involution: 𝒂ന = 𝒂
4. Absorption
• a+ ab =a a(a+b) = a
5. i. a+ഥ𝒂b = a+ b ii. a(ഥ
𝒂 + b) = ab
6. i. ab + 𝒂𝒃ഥ=a ഥ =a
ii. (a+b) (a+𝒃)
ഥ = ab + ac
7. i. ab + a𝒃c ഥ
ii. (a+b) (a+𝒃+c) = (a+b) (a+c)
8. De Morgan’s Theorem
• 𝒂+𝒃= 𝒂 ഥ
ഥ. 𝒃 𝒂. 𝒃= 𝒂ഥ+ 𝒃ഥ
9. Consensus
• ab + 𝒂ഥc + bc = ab + 𝒂
ഥ𝒄 (a+b) (ഥ𝒂 + 𝒄) 𝒃 + 𝒄 = 𝒂 + 𝒃 (ഥ 𝒂 + 𝒄)
10
Basic Properties (Laws)
• Commutative
• Commutative
• 10. X + Y = Y + X
11. X·Y=Y·X
• Associative
• Associative
• 12. X+(Y+Z)=(X+Y)+Z
13. X(YZ) = (XY)Z
• Distributive
• Distributive
14. X(Y+Z) =XY+XZ
15. X+YZ=(X+Y)(X+Z)
AND distributes over OR
OR distributes over AND
11
Basic Properties
• DeMorgan’s Theorem
17. (XY)’ = X’ + Y’
12
Operator Precedence
• The operator precedence for evaluating Boolean Expression is
o Parentheses
o NOT
o AND
o OR
• Examples
o x y' + z
o (x y + z)'
13
Exclusive-OR and XNOR Functions
• Exclusive-OR (XOR)
o xy = xy'+x'y
• Exclusive-NOR (XNOR)
o (xy)' = xy + x'y'
• Some identities
o x0 = x
o x1 = x'
o xx = 0
o xx' = 1
o xy' = (xy)'
o x'y = (xy)'
• Commutative and associative
o AB = BA
o (AB) C = A (BC) = ABC
14
Exclusive-OR Implementations
• Implementations
• (x'+y')x + (x'+y')y = xy'+x'y = xy
Exclusive-OR Implementations 15
Logic Simplification Using Boolean Algebra
AB+A(B+C)+B(B+C)
B
C
16
Logic Simplification Using Boolean Algebra…
• AB+A(B+C)+B(B+C) A
(distributive law) AB+A(B+C)+B(B+C)
AB+AB+AC+BB+BC B
C
( BB=B)
AB+AB+AC+B+BC
( AB+AB=AB) B B+AC
AB+AC+B+BC
A
( B+BC=B)
C
AB+AC+B
( AB+B=B)
B+AC
17
Logic Simplification Using Boolean Algebra…
• Try these:
1.[ AB (C + BD) + A B ]C
2. A BC + AB C + A B C + AB C + ABC
3. AB + AC + A B C
18
Standard Forms of Boolean Expressions
• All Boolean expressions, regardless of their form, can
be converted into either of two standard forms:
19
The Sum-of-Products (SOP) Form
20
Implementation of SOP
X=AB+BCD+AC
• AND/OR implementation ◼ NAND/NAND implementation
A A
B B
B B
C X C X
D D
A A
C C
21
General Expression → SOP
• Any logic expression can be changed into SOP form
by applying Boolean algebra techniques.
• Example:
A( B + CD ) = AB + ACD
AB + B (CD + EF ) = AB + BCD + BEF
( A + B )( B + C + D) = AB + AC + AD + BB + BC + BD
( A + B ) + C = ( A + B )C = ( A + B )C = AC + BC
22
The Standard (canonical) SOP Form
• A standard SOP expression is one in which all
the variables in the domain appear in each
product term in the expression.
• Example: AB CD + A B CD + ABC D
• Standard SOP expressions are important in:
23
Minterms
• For a function of n variables, if a product term
contains each of the n variables exactly one time in
complemented or uncomplemented form
• Uncomplemented variable by 1
• Complemented variable by 0
AB C + A B + ABC D
AB C = AB C ( D + D ) = AB CD + AB CD
A B = A B (C + C ) = A B C + A B C
A B C ( D + D ) + A B C ( D + D ) = A B CD + A B CD + A B C D + A B C D
AB C + A B + ABC D = AB CD + AB CD + A B CD + A B CD + A B C D + A B C D + ABC D
• Try this
AB D + A C + BC D
26
Binary Representation of a Standard Product Term…
27
The Product-of-Sums (POS) Form
• When two or more sum
terms are multiplied, the • In a POS form, a single
result expression is a overbar cannot extend over
product-of-sums (POS):
more than one variable;
• Examples:
( A + B )( A + B + C ) however, more than one
( A + B + C )(C + D + E )( B + C + D )
variable in a term can have
( A + B )( A + B + C )( A + C )
an overbar:
• Also: • Example: A + B +C is OK!
A ( A + B + C )( B + C + D )
• But not: A + B + C
28
Implementation of a POS
X=(A+B)(B+C+D)(A+C)
• OR/AND implementation
A
B
B
C X
D
A
C
29
The Standard (canonical) POS Form
• A standard POS expression is one in which all
the variables in the domain appear in each
sum term in the expression.
• Example: ( A + B + C + D )( A + B + C + D)( A + B + C + D)
30
Maxterm
• For a function of n variables, if a sum term contains
each of the n variables exactly one time in
complemented or uncomplemented form
32
Converting a Sum Term to Standard POS …
( A + B + C )( B + C + D )( A + B + C + D)
A + B + C = A + B + C + DD = ( A + B + C + D)( A + B + C + D )
B + C + D = B + C + D + AA = ( A + B + C + D )( A + B + C + D )
( A + B + C )( B + C + D )( A + B + C + D) =
( A + B + C + D)( A + B + C + D )( A + B + C + D )( A + B + C + D )( A + B + C + D)
• Try this:
( A + B + D )( B + A + D )( A + B + C )
33
Binary Representation of a Standard Sum Term
A+ B +C + D = 0+ 1 +0+ 1 = 0+0+0+0 = 0
34
Converting Standard SOP to Standard POS
• The Facts:
expression.
35
Converting Standard SOP to Standard POS
• What can you use the facts?
• How?
36
Converting Standard SOP to Standard POS
A B C + A BC + A BC + AB C + ABC
• The evaluation is as follows:
000 + 010 + 011 + 101 + 111
• There are 8 possible combinations. The SOP expression contains five of
these, so the POS must contain the other 3 which are: 001, 100, and 110.
( A + B + C )( A + B + C )( A + B + C )
37
Boolean Expressions and Truth Tables
truth table format using binary values for each term in the
expression.
38
Converting SOP Expressions to Truth Table Format
• Recall the fact:
• Step 3: Place a 0 in the output column (X) for each binary value that
makes the standard POS expression a 0 and place 1 for all the
remaining binary values.
41
Converting POS Expressions to Truth Table Format
• Example: Develop
a truth table for
the standard SOP Inputs Output Product
Inputs Sum
expression A B C C X
X Term
Term
( A + B + C )( A + B + C )( A + B + C ) 0 0 0 0 ( A + B + C)
( A + B + C )( A + B + C ) 0 0 1 1
0 1 0 0 ( A + B + C)
0 1 1 0 (A + B + C )
1 0 0 1
1 0 1 0 (A + B + C )
1 1 0 0 ( A + B + C)
1 1 1 1
42
Try it:
• Convert the given SOP to
• A truth table
• a standard POS
A C + A B + AB C + ABC
43
Determining Standard Expression from a Truth Table
uncomplemented, and
• each 0 with the corresponding variable
complement.
• Example: 1010 → AB CD
44
Determining Standard Expression from a Truth Table
• Instructions:
• Step 1: List the binary values of the input variables for which
the output is 0.
45
Determining Standard Expression from a Truth Table
Example:
1 0 1 0 101 → A + B + C
X = A BC + AB C + ABC + ABC
1 1 0 1
X = ( A + B + C )( A + B + C )( A + B + C )( A + B + C )
1 1 1 1
46
The Karnaugh Map
• Feel a little difficult using Boolean algebra laws, rules, and
variable combinations.
47
What is K-Map?
• The K-map is an array of cells in which each cell represents a
binary value of the input variables.
48
Two-Variable Map
• A two-variable map
• Four minterms
• x' = row 0; x = row 1
• y' = column 0; y =
column 1
• A truth table in square
diagram
• In map (a): xy = m3 Figure 3.1 Two-variable Map
• In map (b): x+y = x'y+xy'
+xy = m1+m2+m3
10 10 m4 m5
AB C AB C
• The upper and lower edges are thought of as touching (K-map
appears as cylinder) the first & last rows are adjacent
50
The 4-Variable K-Map
CD
00 01 11 10
AB
00 ABCD ABCD A B CD A B CD
01 A BC D A BC D A BCD A BCD
10 AB C D AB C D AB CD AB CD
51
Cell Adjacency
CD
00 01 11 10
AB
00
01
11
10
52
The 5-Variable K-Map
A
A
DE DE
00 01 11 10 00 01 11 10
BC BC
00 A B C D E A B C DE A B C DE A B C D E
00 AB C D E AB C DE AB C DE AB C D E
01 A BC D E A B C DE A B CDE A B CD E
01 A BC D E AB C DE AB CDE AB CD E
11 A BC D E A BC DE A BCDE A BCD E
11 ABC D E ABC DE ABCDE ABCD E
10 A BC D E A BC DE A BC DE A BC D E
10 ABC D E ABC DE ABC DE ABC D E
53
K-Map SOP Minimization
• The K-Map is used for simplifying Boolean expressions to their minimal form.
• A minimized SOP expression contains the fewest possible terms with fewest
54
Mapping a Standard SOP Expression
• For an SOP expression in standard
form:
The expression:
C
A B C + A B C + ABC + AB C 0 1
AB
000 001 110 100
00
1 1
01
11 1
Try it:
10
A B C + A BC + ABC + ABC 1
A B CD + A BC D + ABC D + ABCD + ABC D + A B C D + AB CD
56
K-Map Simplification of SOP Expressions
• After an SOP expression has been mapped, we can do the process of minimization:
Step1: drawing the k-map according to the number of variables of the Boolean function
Step3: Determining the minimum SOP expression from the map based on the following rules:
Rule2: Each cell in a group must be adjacent to one or more cells in that same group, but all
cells in the group do not have to be adjacent to each other.
Rule3: Always combine cells in power of 2. A group must contain either 1,2,4,8,16,32 cells
(depending on number of variables in the expression)
Rule4: Combine as many cells as possible. Always include the largest possible number of 1s in a
group in accordance with rule 1.
Rule5: Each 1 on the map must be included in at least one group. The 1s already in a group can
be included in another group as long as the overlapping groups include non-common 1s.
Rule7: In grouping cells, always begin with those cells for which there are the fewest number of
adjacent cells. 57
Example: Grouping the 1s
C C
AB 0 1 0 1
AB
00 1 00 1 1
01 1 01 1
11 1 1 11 1
10 10 1 1
58
Example: Grouping the 1s …
CD CD
AB 00 01 11 10 AB 00 01 11 10
00 1 1 00 1 1
01 1 1 1 1 01 1 1 1
11 11 1 1 1
10 1 1 10 1 1 1
59
Determining the Minimum SOP Expression from
the Map
• The following rules are applied to find the minimum product terms and
1. Group the cells that have 1s. Each group of cell containing 1s
contradictory variables.
60
Determining the Minimum SOP Expression from the
Map
2. Determine the minimum product term for each group.
❑ For a 3-variable map:
i. A 1-cell group yields a 3-variable product term
3. When all the minimum product terms are derived from the K-map, they
are summed to form the minimum SOP expression.
61
Example: Determining the Minimum SOP Expression from the Map
CD
00 01 11 10 B + A C + AC D
AB
00 1 1 AC
01 1 1 1 1 B
11 1 1 1 1
10 1 AC D
62
Determining the Minimum SOP Expression from the Map
C C
AB 0 1 0 1
AB
00 1 00 1 1
01 1 01 1
11 1 1 11 1
10 10 1 1
AB + BC + A B C B + A C + AC
63
Determining the Minimum SOP Expression from the Map
CD CD
AB 00 01 11 10 AB 00 01 11 10
00 1 1 00 1 1
01 1 1 1 1 01 1 1 1
11 11 1 1 1
10 1 1 10 1 1 1
A B + A C + AB D D + AB C + BC
64
Try: Do the K-Map (SOP) simplification
AB C + A BC + A B C + A B C + AB C
B + AC
B C D + A BC D + ABC D + A B CD + AB CD +
A B CD + A BCD + ABCD + AB CD
D + BC
65
Mapping Directly from a Truth Table
I/P O/P
A B C X C
0 1
0 0 0 1 AB
0 0 1 0
00 1
0 1 0 0
0 1 1 0 01
1 0 0 1
1 0 1 0 11 1 1
1 1 0 1
10 1
1 1 1 1
66
“Don’t Care” Conditions
• Sometimes a situation arises in which some input variable
❑ There are six invalid combinations: 1010, 1011, 1100, 1101, 1110,
and 1111.
involving the BCD code → they can be treated as “don’t care” terms
• The “don’t care” terms can be used to advantage on the K-map (how?
67
“Don’t Care” Conditions
INPUTS O/P CD
A B C D Y 00 01 11 10
0 0 0 0 0 AB
0 0 0 1 0
0 0 1 0 0 00
0
0
0
1
1
0
1
0
0
0
01 1
0
0
1
1
0
1
1
0
0
0
11 x x x x
0
1
1
0
1
0
1
0
1
1
10 1 1 x x
1 0 0 1 1
Without “don’t care”
1 0 1 0 X
Y = AB C + A BCD
1 0 1 1 X
1 1 0 0 X
1 1 0 1 X
With “don’t care”
1 1 1 0 X
Y = A + BCD
1 1 1 1 X
68
K-Map POS Minimization
◼ The approaches are much the same (as SOP) except that with POS expression, 0s
representing the standard sum terms are placed on the K-map instead of 1s.
◼ Grouping the 0 (rule):
1. Each cell on a K-map of n-variables has n logically adjacent cells
2. Each cell in a group must be adjacent to one or more cells in that same group,
but all cells in the group do not have to be adjacent to each other.
4. Combine as many cells as possible. Always include the largest possible number
of 0s in a group in accordance with rule 1.
5. Each 0 on the map must be included in at least one group. The 0s already in a
group can be included in another group as long as the overlapping groups
include non common 0s.
7. In grouping cells, always begin with those cells for which there are the fewest
number of adjacent cells.
69
Example: Mapping a Standard POS Expression
The expression:
C
( A + B + C )( A + B + C )( A + B + C )( A + B + C ) 0 1
AB
000 010 110 101
00
0
01
0
11 0
10
0
70
K-map Simplification of POS Expression
( A + B + C )( A + B + C )( A + B + C )( A + B + C )( A + B + C )
C
0 1
AB A
00 0 0 A( B + C )
01 AB + AC
0 0
11 AC
0 1
B +C
10 1 1 AB
71
Quine-McCluskey (Q-M) Technique
Step1: group the given min terms based on the number of ones present in their binary
representations.
Step2: pair the min terms present in successive groups. If there is a change in only one-bit
position, then take the pair of those two min terms. Place this symbol ‘_’ in the differed bit
position and keep the remaining bits as it is.
Step3: Repeat step2 with newly formed terms till we get all prime implicants.
Step4: Formulate the prime implicant table. It consists of set of rows and columns. Prime
implicants can be placed in row wise and min terms can be placed in column wise. Place ‘1’ in
the cells corresponding to the min terms that are covered in each prime implicant.
Step5: Find the essential prime implicants by observing each column. If the min term is
covered only by one prime implicant, then it is essential prime implicant. Those essential prime
implicants will be part of the simplified Boolean function.
Step6: Reduce the prime implicant table by removing the row of each essential prime implicant
and the columns corresponding to the min terms that are covered in that essential prime
implicant. Repeat step 5 for Reduced prime implicant table. Stop this process when all min
terms of given Boolean function are over.
73
Ex ample: simplify the following Boolean function f(A,B,C,D)=∑m(2,6,8,9,10,11,14,15) using
Quine-McClukey tabular method.
Solution:
2 0 0 1 0
G1
8 1 0 0 0
6 0 1 1 0
G2 9 1 0 0 1
10 1 0 1 0
11 1 0 1 1
G3
14 1 1 1 0
G4 15 1 1 1 1
74
Solution…
Step2: Pair the min terms present in successive groups
Group Name Min terms A B C D
2,6 0 - 1 0
2,10 - 0 1 0
G1
8,9 1 0 0 -
8,10 1 0 - 0
6,14 - 1 1 0
9,11 1 0 - 1
G2
10,11 1 0 1 -
10,14 1 - 1 0
11,15 1 - 1 1
G3
14,15 1 1 1 -
75
Solution…
Step3: Repeating step2
2,10,6,14 - - 1 0
G1
8,9,10,11 1 0 - -
8,10,9,11 1 0 - -
10,11,14,15 1 - 1 -
G2
10,14,11,15 1 - 1 -
Step3: …
2,6,10,14 - - 1 0
G1
8,9,10,11 1 0 - -
G2 10,11,14,15 1 - 1 -
76
Solution…
Step4: Formulate the prime implicant table
Prime Implicants 2 6 8 9 10 11 14 15
CD’ 1 1 1 1
AB’ 1 1 1 1
AC 1 1 1 1
Prime Implicants 8 9 11 15
AB’ 1 1 1
AC 1 1
Step6: Repeat step5 Finally, we got three prime implicants and all the three
77
ASSIGNMENT FROM CHAPTER THREE (IN GROUP)
1. Explain briefly the design advantage of don’t care condition while designing digital systems.
2. Compare and contrast the Boolean rule, k-map and quine-McCluskey Boolean function
simplification methods.
B. 𝐀′ + 𝐂 ′ + 𝐃′ (𝐀 + 𝐂 + 𝐁)(𝐂′ + 𝐃)(′𝐃)
ሜ
C. (𝐁 + 𝐃)(𝐀 + 𝐁 + 𝐂)(𝐀 ሜ
+ 𝐁)(𝐀 ሜ
+ 𝐁ሜ + 𝐂)
4. Simplify the following expressions using K-Map, and implement them with Logic gate circuits.
B. 𝐃 + 𝐂ሜ 𝐃 ሜ + 𝐀𝐂𝐃 + 𝐀(𝐂 + 𝐃)
ሜ + 𝐂𝐃 ሜ
ሜ + 𝐀𝐂 + 𝐀𝐁ሜ
C. 𝐁(𝐃 + 𝐀) + 𝐂𝐃
5. Generate a truth table for the following min and max terms of the Boolean expressions.
B. f(A,B,C,D,E) = ς 𝐌(𝟏, 𝟑, 𝟓, 𝟕, 𝟗, 𝟏𝟏, 𝟏𝟑, 𝟏𝟓, 𝟏𝟕, 𝟏𝟗, 𝟐𝟏, 𝟐𝟑, 𝟐𝟓, 𝟐𝟕, 𝟐𝟗, 𝟑𝟏)
78
ASSIGNMENT FROM CHAPTER THREE (IN GROUP)…
6. Generate a truth table for the following min and max terms of the Boolean functions.
B. f(A,B,C,D) = ς 𝐌(𝟎, 𝟐, 𝟒, 𝟔, 𝟖, 𝟏𝟎, 𝟏𝟐, 𝟏𝟒, 𝟏𝟔, , 𝟏𝟖, 𝟐𝟎, 𝟐𝟐, 𝟐𝟒, 𝟐𝟔, 𝟐𝟖, 𝟑𝟎)
7. Find the minimal SOP form for: 10. Repeat question #7(b) using QM method
A. f(A,B,C,D) = σ 𝐦(𝟎, 𝟏, 𝟐, 𝟑, 𝟕, 𝟖, 𝟏𝟎, 𝟏𝟑) 11. Repeat question #8(b) using QM method
B. f(A,B,C,D,E) = σ 𝐦(𝟎, 𝟐, 𝟒, 𝟕, 𝟏𝟎, 𝟏𝟐, 𝟏𝟑, 𝟏𝟖, 𝟐𝟑, 𝟐𝟔, 𝟐𝟖, 𝟐𝟗)
B. f(A,B,C,D,E) = ς 𝐌(𝟎, 𝟐, 𝟒, 𝟔, 𝟖, 𝟏𝟎, 𝟏𝟐, 𝟏𝟒, 𝟏𝟔, , 𝟏𝟖, 𝟐𝟎, 𝟐𝟐, 𝟐𝟒, 𝟐𝟔, , 𝟐𝟖, 𝟑𝟎)
9. Minimize the function in SOP & POS forms using K-map and plot the logic diagram for both
80