1. Ashwini E Boolean Algebra
Ashwini E Contact me Ashwiniesware@gmail.com
43
BOOLEAN EXPRESSION:
Boolean expressions which consist of a single variable or its complement ex:
X or Y or Z are known as literals.
Minterms:
One of the most powerful theorems within Boolean algebra states that any
Boolean function can be expressed as the sum of products of all the variables within
the system. For example, X + Y can be expressed as the sum of several products,
each of the product containing letters X and Y. These products are called minterms.
Minterm is a product of all the literals (with or without bar) within the logic
system. This is also called as product term.
We can obtain the minterm for different variables by the following method:
For variable with a value 0, take its complement and the variable with value 1,
multiply it as it is.
Example: If X =0, Y = 1, Z =0 then minterm will be X Y Z .
Similarly for X =1, Y =0, Z =0, minterm will be X Y Z .
Steps involved in minterm expansion of expression:
1. First convert the given expression in sum of products form.
2. In each term, if any variable is missing in each term multiply that term with
(missing term + termmissing ) factor, (ex if Y is missing, multiply with Y + Y ).
3. Expand the expression.
4. Remove all duplicate terms and we will have minterm form of an
expression.
Example: Convert X + Y to minterms.
Solution: X + Y = X . l + Y. l (In 1st term Y is missing and in 2nd term X
is missing)
= X . (Y + Y ) + Y . (X + X ) (X + X =1 complementarity law)
= X Y + X Y + X Y + X Y
= X Y + X Y + X Y + X Y
= X Y + X Y + X Y (Removing duplicate term, X Y)
Note that each term in the above example contains all the letters used : X and Y.
The terms XY, X Y and X Y are therefore minterms. This process is called
expansion of expression.
Other procedure for expansion could be:
1. Write down all the terms
2. Put X's where letters must be inserted to convert the term to a product term
3. Use all combinations of X's in each term to generate minterms.
2. Ashwini E Boolean Algebra
Ashwini E Contact me Ashwiniesware@gmail.com
44
4. Drop out duplicate terms.
Example: Find the minterms for AB + C.
Solution: It is a 3 variable expression, so a product term must have all three
letters A, B and C
1. Write down all the terms AB+C
2. Insert X's where letters are missing ABX + XXC
3. Write all the combinations of X's in first term AB C , ABC
Write all the combinations of X's in second term A B C, A B C, ABC, A BC
4. Add all of them.
Therefore, AB+ C = AB C + ABC + A B C + A B C + ABC + A BC
5. Now remove all duplicate terms
(ABC appeared two times. So one ABC term is removed)
= AB C + ABC + A B C + A B C + A BC
Now, to verify we will prove vice versa
i.e., A B C + A B C + A B C + A B C + A B C = A B + C
LHS = A B C + A B C + A B C + A B C + A B C
= A B C + A B C + A B C + A B C + A B C (Rearranging the tems)
= A C( B + B) + A B C + A B( C +C)
= A C.1+ A B C + A B.1 ( B + B = 1 and C +C = 1)
= A C + A B + A B C ( A C.1 = A C as X.1 = X)
= A C + A(B + B C) (B + B C=B + C as X + X Y=X + Y)
= A C + A(B + C)
= A C + + A C
= A B + A C + A C
= A B + C( A + A) ( A + A = 1)
= A B + C = RHS
Shorthand minterm notation:
Since all the letters (2 in case of 2 variable expression, 3 in case of 3 variable
expression) must appear in every product, a shorthand notation has been
developed that saves actually writing down the letters themselves. To form this
notation, following steps are to be followed :
1. First, copy original terms.
2. Substitute 0's for barred letters and l's for nonbarred letters.
3. Express the decimal equivalent of binary word as a subscript of m.
Example (1): To find the minterm designation of X Y Z .
3. Ashwini E Boolean Algebra
Ashwini E Contact me Ashwiniesware@gmail.com
45
Solution:
1.Copy Original form = X Y Z
2. Substitute l's for nonbarred and 0's for barred letters.
Thus, Binary equivalent will be 100.
Decimal equivalent of 100 = 1 x 22 + 0 x 21 + 0 x 20 = 4 + 0 + 0 = 4
3. Express as decimal subscript of m = m4
4. Thus X Y Z = m4
Example (1): To find the minterm designation of A B C D .
Solution:
1.Copy Original form = A B C D
2. Substitute l’s for nonbarred and 0’s for barred letters.
Thus, Binary equivalent will be 1010.
Decimal equivalent of 1010 = 1 x 23 + 0 x 22 + 1 x 21 + 0 x 20
= 8 + 0 + 2 + 0 = 10
3. Express as decimal subscript of m = m10
4. Thus A B C D= m10
Maxterms:
In logical system, if there is something called minterm, there surely must be
one called Maxterm.
If the value of a variable is 1, then its complement is added otherwise the
variable is added as it is.
Example: If the values of variables are X=0, Y =1 and Z = l then its Maxterm is
X + Y + Z (Y and Z are l's, so their complements are taken;
X =0, so it is taken as it is)
Similarly, if given values are X = 1, Y = 0, Z = 0 and W =1 then its Maxterm is
X + Y + Z + W
Maxterm is a sum of all the literals (with or without bar) within the logic system.
This is called as sum term.
Maxterms can also be written as M with a subscript which is decimal equivalent of
given input combination.
Example (1): To find the Maxterm designation of X + Y + Z + W .
Solution:
1.Copy Original form = X + Y + Z + W
2.Substitute l's for barred and 0's for nonbarred letters.
Thus, Binary equivalent will be 1001.
Decimal equivalent of 1001 = 1 x 23 + 0 x 22 + 0 x 21 + 1 x 20
4. Ashwini E Boolean Algebra
Ashwini E Contact me Ashwiniesware@gmail.com
46
= 8 + 0 + 0 + 1 = 9
3. Express as decimal subscript of M = M9
4. Thus X + Y + Z + W = M9
Canonical Expression:
Boolean Expression composed entirely either of Minterms or Maxterms is
referred to as Canonical Expression.
Canonical expression can be represented in following two forms :
(i) Sum-of-Products (S-O-P) form (ii) Product-of-sums (P-O-S) form
(i) Sum-of-Products (S-O-P) form:
A logical expression is derived from two sets of known values :
1. Various possible input values
2. The desired output values for each of the input combinations.
Let us consider a specific problem.
A logical network has two inputs X and Y and an output Z. The relationship
between inputs and outputs is to be as follows :
(i) When X=0 and Y=0, then Z = l
(ii) When X=0 and Y = l, then Z=0
(iii) When X=l and Y=0, then Z = l
(iv) When X=l and Y=1, then Z = l
Prepare a truth table from the above relations and add one more column
consisting list of product terms or minterms (For variable with a value 0, take its
complement and the variable with value 1, multiply it as it is).
Adding all the terms for which the output is 1 i.e., Z=l we get following
expression : X Y + X Y + X Y = Z
The above expression containing only minterms. This type of expression is
called minterm canonical form of boolean expression or canonical sum-of-products
form of expression.
Example: A boolean function F defined on three input variables X, Y and Z is 1 if
and only if number of 1 (one) inputs is odd (ex: F is 1 if X = l, Y =0, Z = 0).
Draw the truth table for the above function and express it in canonical sum-of-
Products form.
Solution. The output is 1, only if one of the inputs is odd (i.e., Number of 1’s must
be one only). All the possible combinations when one of inputs is odd are
X = 1, Y = 0, Z = 0
X Y Z Product Terms
0 0 1 X Y
0 1 0 X Y
1 0 1 X Y
1 1 1 X Y
5. Ashwini E Boolean Algebra
Ashwini E Contact me Ashwiniesware@gmail.com
47
X = 0, Y = 1, Z = 0
X = 0, Y = 0, Z = l
Only for these combinations output is 1, otherwise output is 0. Prepare the
truth table as follows:
X Y Z F
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 0
Add a new column containing minterms (For input variables with a value 0,
take its complement and the variable with value 1, multiply it as it is).
Adding all the minterms (product terms) for which output is 1, we get X Y Z
+ X Y Z + X Y Z = F This is the desired Canonical Sum-of-Products form.
So, deriving S-O-P expression from Truth Table can be summarised as follows :
1. For a given expression, prepare a truth table for all possible combinations of
inputs and outputs.
2. Add a new column and write the minterms for all the combinations.
3. Add all the minterms for which there is output as 1. This gives you the desired
canonical S-O-P expression.
Another method of deriving canonical S-O-P expression is Algebraic Method.
Example: Convert X Y + X Z into canonical sum of products form.
X Y Z F
Product Terms /
minterms
0 0 0 0 X Y Z
0 0 1 1 X Y Z
0 1 0 1 X Y Z
0 1 1 0 X Y Z
1 0 0 1 X Y Z
1 0 1 0 X Y Z
1 1 0 0 X Y Z
1 1 1 0 X Y Z
6. Ashwini E Boolean Algebra
Ashwini E Contact me Ashwiniesware@gmail.com
48
Solution:
Rule 1: Simplify the given expression using appropriate theorems/rules.
X Y + X Z = (X + Y ) (X + Z) (using DeMorgan's 2nd theorem:
YX = X + Y
= X + Y Z (using Distributive law)
Since it is a 3 variable expression, a product term must have all 3 variables.
Rule 2: Wherever a literal is missing, multiply that term with
(missing term + termmissing )
= X + Y Z
= X(Y + Y )(Z + Z ) + (X + X ) Y Z
(Y, Z are missing in first term, X is missing in second term)
= (XY + X Y )(Z + Z ) + X Y Z + X Y Z
= Z(XY + X Y ) + Z (XY + X Y ) + X Y Z + X Y Z
= XYZ + X Y Z + XY Z + X Y Z + X Y Z + X Y Z
Rule 3: Remove duplicate terms (i.e., X Y Z is duplicate term)
= XYZ + X Y Z + XY Z + X Y Z + X Y Z
This is the desired Canonical Sum-of-Products form.
Above Canonical Sum-of-Products expression can also be represented by
following short hand notation.
F = (1, 4, 5, 6, 7), where F is a variable function. (XYZ = 111 = 7
X Y Z = 101 = 5, XY Z = 110 = 6, X Y Z = 100 = 4, X Y Z = 001=1)
This specifies that output F is sum of 1st, 4th, 5th, 6th, and 7th minterms.
i.e., F = m1 + m4 + m5 + m6 + m7
Converting Shorthand Notation to Minterms:
We knoe how to represent minterm into short hand notation. Now we will
learn how to convert vice versa.
Rule 1: Find binary equivalent of decimal subscript.
Ex: for m6 subscript is 6, binary equivalent of 6 is 110.
Rule 2: For every l's write the variable as it is and for 0's write variable's
complemented form
i.e., for 110 it is XY Z ,
Thus, XY Z is the required minterm for m6 .
Example: Convert the following three input function F denoted by the expression:
F = (0, 1, 2, 5), into its canonical Sum-of-Products form.
Solution: If three inputs we take as X, Y and Z then
7. Ashwini E Boolean Algebra
Ashwini E Contact me Ashwiniesware@gmail.com
49
F = m0 + m1 + m2 + m5
m0 = 000 = X Y Z ; m1 = 001 = X Y Z ;
m2 = 010 = X Y Z ; m5 = 101 = X Y Z
Canonical S-O-P form of the expression is: X Y Z + X Y Z + X Y Z + X Y Z
(ii) Product-of-Sum (P-O-S) form:
When a boolean expression is represented purely as a product of Maxterms,
it is said to be in canonical Product-of-Sum form of expression.
This form of an expression is also referred to as Maxterm canonical form of
Boolean expression.
Truth Table Method:
The truth table method for arriving at the desired expression is as follows :
1. Prepare a table of inputs and outputs.
2. Add one additional column of sum terms. For each row of the table, a sum
term is formed by adding all the variables in complemented or
uncomplemented form i.e., if input value for a given variable is 1, variable is
complemented and if 0, not complemented.
For ex: X =0, Y =1, Z = 1, sum term will be X + Y + Z .
3. Now the desired expression is product-of-sums from the rows in which the
output is 0.
Example: Express in the product of sums form, the boolean function F(X, Y, Z)
and the truth table for which is given below :
X Y Z F
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1
Add a new column containing Maxterms (For input variables with a value 1,
take its complement and the variable with value 0, add it as it is).
X Y Z F
Sum Terms /
Maxterms
0 0 0 1 X + Y + Z
0 0 1 0 X + Y + Z
0 1 0 1 X + Y + Z
8. Ashwini E Boolean Algebra
Ashwini E Contact me Ashwiniesware@gmail.com
50
Now multiplying the Maxterms for the output 0s, we get the desired product
of sums expression is:
F = (X + Y + Z ) (X + Y + Z ) ( X + Y + Z )
Algebraic Method:
Example: Express X Y + Y( Z ( Z + Y)) into canonical product-of-sums form.
Solution:
Rule 1: Simplify the given expression using appropriate theorems/rules:
X Y + Y( Z ( Z + Y))
= X Y + Y( Z Z + Z Y) (using distributive law i.e., X(Y + Z) = XY + XZ)
= X Y + Y( Z + Z Y) ( Z Z = Z as X.X = X)
= X Y + Y Z (1 + Y)
= X Y + Y Z .1 (1 + Y =1)
= X Y + Y Z
Rule 2: To convert into product of sums form, apply the boolean algebra rule
which states that
X + Y Z=(X + Y) (X + Z)
Now applying this rule we get,
X Y + Y Z = ( X Y + Y) ( X Y + Z )
= (Y + X Y) ( Z + X Y ) (X + Y = Y + X)
= (Y + X ) (Y + Y) ( Z + X ) ( Z + Y)
= ( X + Y) (Y) ( X + Z ) (Y + Z ) (Y + Y = Y)
=
Now, this is in product of sums form but not in canonical product of sums
form (In canonical expression all the sum terms are Maxterms).
0 1 1 0 X + Y + Z
1 0 0 1 X + Y + Z
1 0 1 0 X + Y + Z
1 1 0 1 X + Y + Z
1 1 1 1 X + Y + Z
9. Ashwini E Boolean Algebra
Ashwini E Contact me Ashwiniesware@gmail.com
51
Rule 3: After converting into product of sum terms, in a sum term for a missing
variable add (missing term . termmissing ). Ex: if variable Y is missing add Y Y .
= ( X + Y) (Y) ( X + Z ) (Y + Z )
1 2 3 4
Terms: = ( X + Y + Z Z ) (X X + Y + Z Z ) ( X +Y Y + Z ) (X X + Y + Z )
Rule 4: Keep on simplifying the expression (using the rule, X + YZ=(X + Y)(X + Z ))
until you get product of sum terms which are Maxterms.
= ( X + Y + Z Z ) (X X + Y + Z Z ) ( X +Y Y + Z ) (X X + Y + Z )
= ( X + Y + Z) ( X + Y + Z ) (X X + Y + Z) (X X + Y + Z ) ( X +Y+ Z )( X + Y + Z )
(X + Y + Z ) ( X + Y + Z )
= ( X + Y + Z) ( X + Y + Z ) (X + Y + Z) ( X + Y + Z) (X + Y + Z ) ( X +Y+ Z )
( X + Y + Z ) ( X + Y + Z ) (X + Y + Z ) ( X + Y + Z )
Rule 5: Removing all the duplicate terms, we get
= ( X + Y + Z) ( X + Y + Z ) (X + Y + Z) (X + Y + Z ) ( X + Y + Z )
This is the desired canonical product of sums form of expression.
Shorthand Maxterm Notation:
Shorthand notation for the above given canonical product of sums expression
is
F = π (0, 1, 4, 5, 7)
This specifies that output F is product of 0th, 1st, 4th, 5th, 7th Maxterms
i.e., F = M0 . M1 . M4 . M5 . M7
(Maxterm is obtained by complementing the variable if input is 1 otherwise not)
In the above function M0 means Binary equivalent of 0 i.e., 0 0 0
X=0, Y = 0, Z=0 and Maxterm will be (X + Y + Z)
Similarly, M1 means 001 and Maxterm is X + Y + Z
As F = M0 . M1 . M4 . M5 . M7
and M0 = 000 (X + Y + Z)
M1 = 001 (X + Y + Z )
M4 = 100 ( X + Y + Z)
M5 = 101 ( X + Y + Z )
M7 = 111 ( X + Y + Z )
F = (X + Y + Z) (X + Y + Z )( X + Y + Z) ( X + Y + Z )( X + Y + Z )
Example: Convert the following function into canonical product of sums form
F(X, Y, Z) = π (0, 2, 4, 5)
10. Ashwini E Boolean Algebra
Ashwini E Contact me Ashwiniesware@gmail.com
52
Solution: F(X, Y, Z) = π (0, 2, 4, 5) = M0 . M2 . M4 . M5
M0 = 000 (X + Y + Z)
M2 = 010 (X + Y + Z)
M4 = 100 ( X + Y + Z)
M5 = 101 ( X + Y + Z )
F = (X + Y + Z) (X + Y + Z) ( X + Y + Z) ( X + Y + Z )
Sum-term Vs Maxterm and Product-term Vs minterm
Sum term means sum of the variables. It does not necessarily mean that all
the variables must be included whereas Maxterm means sum term having all the
variables.
For example, for a 3 variables F (X, Y, Z), functions X + Y, X + Z, Y + Z etc.
are sum terms whereas X + Y + Z, X + Y + Z , X + Y + Z etc. are Maxterms.
Similarly, product term means product of the variables, not necessarily all
the variables whereas minterm means product of all the variables.
For a 3 variables (A, B, C) function AB C , ABC , A B C are minterms where
as AB, B C , B C , A C etc. are minterms are product terms only.
Same is the difference between Canonical S-O-P or P-O-S expression and S-
O-P expression or P-O-S expression. A Canonical SOP or POS expression must have
all the Maxterms or Minterms respectively whereas a simple S-O-P or P-O-S
expression can just have product terms or sum terms.
Minimization of Boolean Expression:
After obtaining an S-O-P or P-O-S expression, the next thing to do is to
simplify the Boolean expression because Boolean operations are practically
implemented in the form of gates. A minimized Boolean expression means less
number of gates which means simplified circuitary.
There are two methods of simplification of Boolean expressions.
Algebraic Method
This method makes use of Boolean postulates, rules and theorems to simplify
the expressions.
Example(1): Simplify A B C D + A B C D + A B C D + A B C D.
Solution: A B C D + A B C D + ABC D + ABCD
= A B C( D+ D) + ABC( D+ D)
= A B C . 1 + ABC.1 ( D+ D=1)
= AC( B + B) (A B C.1 = A B C as X.1 = X)
= AC.1 = AC ( B + B =1)
Example(2): Simplify XY + X + X Y
11. Ashwini E Boolean Algebra
Ashwini E Contact me Ashwiniesware@gmail.com
53
Solution: XY + X + X Y
= X + Y + X + X Y (using DeMorgans’s theorem: XY = X + Y )
= X + X + Y + X Y (Rearrange the terms)
= X + Y + X Y ( X + X = X as X + X = X)
= X + X Y + Y
= X + X Y + Y (putting X = X )
= X + Y + Y (X + X Y = X + Y)
= X + 1 (Y + Y = 1)
= 1 ( X + 1 = 1 as 1 + X =1)
Example(3): Minimise A B + AC + A B C(AB + C).
Solution: = A B + AC + A B C(AB + C)
= A B + AC + A B CAB + A B CC
= A B + AC + AAB B C + A B C (C.C = C)
= A B + AC + 0 + A B C (B B = 0)
= A B + A + C + A B C (using DeMorgan’s theorem)
= A + A B + C + A B C (rearranging the terms)
= A + B + C + A B C (because X + X Y = X + Y, A + A B = A + B)
= A + C + B + B AC (rearranging the terms)
= A + C + B + AC (B + B A C = B +AC as X + X Y = X + Y )
= A + B + C + CA (rearranging the terms)
= A + B + C + A ( C + CA = C + A as X + X Y = X + Y)
= A + A + B + C
= 1 + B + C (A + A = 1)
= 1 (1 + B + C = 1, anything added to 1 is 1)
Example(4): Reduce X Y Z + X Y Z + X Y Z + X Y Z .
Solution: = X Y Z + X Y Z + X Y Z + X Y Z
= X Z ( Y + Y) + X Z ( Y + Y)
= X Z . 1 + X Z . 1 ( Y + Y = 1)
= X Z + X Z
= Z ( X + X)
12. Ashwini E Boolean Algebra
Ashwini E Contact me Ashwiniesware@gmail.com
54
= Z . 1 ( X + X = 1)
= Z
Problems:
(1) Simplify the following expression:
A B C + A B C + A B C + A B C
(2) Reduce ABCD + A B C D + A BCD + A B CD + ABC D
youtube channel
______________