Chapter 2 Boolean Expression
Chapter 2 Boolean Expression
1. Commutative Law states that the interchanging of the order of operands in a Boolean
equation does not change its result. For example:
1. OR operator A + B = B + A
2. AND operator A. B = B . A
2. Associative Law of multiplication states that the AND operation are done on two or more
than two variables. For example:
A * (B * C) = (A * B) * C
3. Distributive Law states that the multiplication of two variables and adding the result with
a variable will result in the same value as multiplication of addition of the variable with
individual variables. For example:
A + BC = (A + B) (A + C).
4. Annulment law:
A.0 = 0
A+1=1
5. Identity law:
A.1 = A
A+0=A
6. Idempotent law:
A+A=A
A.A = A
7. Complement law:
A + A' = 1
A.A'= 0
8. Double negation law:
((A)')' = A
9. Absorption law:
A.(A+B) = A
A + AB = A
De Morgan’s Law:
De Morgan's Law is also known as De Morgan's theorem, works depending on the concept of
Duality. Duality states that interchanging the operators and variables in a function, such as
replacing 0 with 1 and 1 with 0, AND operator with OR operator and OR operator with AND
operator.
De Morgan stated 2 theorems, which will help us in solving the algebraic problems in digital
electronics. The De Morgan's statements are:
1. "The negation of a conjunction is the disjunction of the negations", which means that the
complement of the product of 2 variables is equal to the sum of the compliments of
individual variables. For example, ¿ ¿) = A + B.
2. "The negation of disjunction is the conjunction of the negations", which means that
compliment of the sum of two variables is equal to the product of the complement of each
variable. For example, ¿ ¿) = A . B.
Let us consider an example of a Boolean function: AB+A (B+C) + B (B+C)The logic diagram
for the Boolean function AB+A (B+C) + B (B+C) can be represented as:
We will simplify this Boolean function on the basis of rules given by Boolean algebra.
AB + A (B+C) + B (B+C)
AB + AB + AC + BB + BC {Distributive law; A (B+C) = AB+AC, B (B+C) =
BB+BC}
AB + AB + AC + B + BC {Idempotent law; BB = B}
AB + AC + B + BC {Idempotent law; AB+AB = AB}
AB + AC +B {Absorption law; B+BC = B}
B + AC {Absorption law; AB+B = B}
SOP form representation is most suitable to use them in FPGA (Field Programmable Gate
Arrays).
Examples
F(A,B,C,D,E)=AB + ABC + CDE
F(A,B,C,D,E) =(AB) ̅ + ABC + CD E ̅
SOP form can be obtained by
● Writing an AND term for each input combination, which produces HIGH output.
● Writing the input variables if the value is 1, and write the complement of the variable if its value
is 0.
● OR the AND terms to obtain the output function.
Ex: Boolean expression for majority function F = A’BC + AB’C + ABC ‘ + ABC
Truth table:
Now write the input variables combination with high output. F = AB + BC + AC.
Checking
By Idempotence law, we know that
([ABC + ABC)] + ABC) = (ABC + ABC) = ABC
Now the function F = A’BC + AB’C + ABC ‘ + ABC
= A’BC + AB’C + ABC’ + ([ABC + ABC)] + ABC)
= (ABC + ABC ‘) + (ABC + AB’C) + (ABC + A’BC)
= AB (C + C ‘) + A (B + B’) C + (A + A’) BC
= AB + BC + AC.
Product of Sums (POS) Form
The product of sums form is a method (or form) of simplifying the Boolean expressions of logic
gates. In this POS form, all the variables are ORed, i.e. written as sums to form sum terms.
All these sum terms are ANDed (multiplied) together to get the product-of-sum form. This form
is exactly opposite to the SOP form. So this can also be said as “Dual of SOP form”.
Here the sum terms are defined by using the OR operation and the product term is defined by
using AND operation. When two or more sum terms are multiplied by a Boolean OR operation,
the resultant output expression will be in the form of product-of-sums form or POS form.
The product-of-sums form is also called as Conjunctive Normal Form as the sum terms are
ANDed together and Conjunction operation is logical AND. Product-of-sums form is also called
as Standard POS.
Examples
F(A,B,C,D,E)= (A+B) * (A + B + C) * (C +D)
F(A,B,C,D,E)= (A+B) ̅ * (C + D + E ̅)
POS form can be obtained by
● Writing an OR term for each input combination, which produces LOW output.
● Writing the input variables if the value is 0, and write the complement of the variable if its value
is 1.
● AND the OR terms to obtain the output function.
Ex: Boolean expression for majority function F = (A + B + C) (A + B + C ‘) (A + B’ + C) (A’ +
B + C)
Now write the input variables combination with high output. F = AB + BC + AC.
Checking
By Idempotence law, we know that
[(A + B + C) (A + B + C)] (A + B + C) = [(A + B + C)] (A + B + C) = (A + B + C)
Now the function
F = (A + B) (B + C) (A + 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) (A’ + B + C)
= [(A + B + C) (A + B + C ‘)] [(A + B + C) (A’ + B + C)] [(A + B + C) (A + B’ + C)]
= [(A + B) + (C * C ‘)] [(B + C) + (A * A’)] [(A + C) + (B * B’)]
= [(A + B) + 0] [(B + C) + 0] [(A + C) + 0] = (A + B) (B + C) (A + C)
Canonical Form (Standard SOP and POS Form)
Any Boolean function that is expressed as a sum of minterms or as a product of max terms is
said to be in its “canonical form”.
It mainly involves in two Boolean terms, “minterms” and “maxterms”.
When the SOP form of a Boolean expression is in canonical form, then each of its product term
is called ‘minterm’. So, the canonical form of sum of products function is also known as
“minterm canonical form” or Sum-of-minterms or standard canonical SOP form.
Similarly, when the POS form of a Boolean expression is in canonical form, then each of its sum
term is called ‘max term’. So, the canonical form of product of sums function is also known as
“maxterm canonical form or Product-of sum or standard canonical POS form”.
Min terms
A min term is defined as the product term of n variables, in which each of the n variables will appear once either
A variable is in complemented form, if its value is assigned to 0, and the variable is un-
complimented form, if its value is assigned to 1.
For a 2-variable (x and y) Boolean function, the possible minterms are:
x’y’, x’y, xy’ and xy.
For a 3-variable (x, y and z) Boolean function, the possible minterms are:
x’y’z’, x’y’z, x’yz’, x’yz, xy’z’, xy’z, xyz’ and xyz.
● 1 – Minterms = minterms for which the function F = 1.
● 0 – Minterms = minterms for which the function F = 0.
Any Boolean function can be expressed as the sum (OR) of its 1- min terms. The representation
of the equation will be
● F(list of variables) = Σ(list of 1-min term indices)
Ex: F (x, y, z) = Σ (3, 5, 6, 7)
The inverse of the function can be expressed as a sum (OR) of its 0- min terms. The
representation of the equation will be
● F(list of variables) = Σ(list of 0-min term indices)
Ex: F’ (x, y, z) = Σ (0,1, 2, 4)
Examples of canonical form of sum of products expressions (min term canonical form):
i) Z = XY + XZ′
ii) F = XYZ′ + X′YZ + X′YZ′ + XY′Z + XYZ
In standard SOP form, the maximum possible product terms for n number of variables are given
by 2ⁿ. So, for 2 variable equations, the product terms are 22 = 4. Similarly, for 3 variable
equations, the product terms are 23 = 8.
Max terms
A max term is defined as the product of n variables, within the range of 0 i < 2. The max term is denoted as Mi.
For a 2-variable (x and y) Boolean function, the possible max terms are:
x + y, x + y’, x’ + y and x’ + y’.
For a 3-variable (x, y and z) Boolean function, the possible maxterms are:
x + y + z, x + y + z’, x + y’ + z, x + y’ + z’, x’ + y + z, x’ + y + z’, x’ + y’ + z and x’ + y’ + z’.
● 1 – Max terms = max terms for which the function F = 1.
● 0 – max terms = max terms for which the function F = 0.
Any Boolean function can be expressed the product (AND) of its 0 – max terms. The
representation of the equation will be
● F(list of variables) = Π (list of 0-max term indices)
Ex: F (x, y, z) = Π (0, 1, 2, 4)
The inverse of the function can be expressed as a product (AND) of its 1 – max terms. The
representation of the equation will be
● F(list of variables) = Π (list of 1-max term indices)
Ex: F’ (x, y, z) = Π (3, 5, 6, 7)
Examples of canonical form of product of sums expressions (max term canonical form):
i. Z = (X + Y) (X + Y′)
ii. F = (X′ + Y + Z′) (X′ + Y + Z) (X′ + Y′ + Z′)
In standard POS form, the maximum possible sum terms for n number of variables are given by
2ⁿ. So, for 2 variable equations, the sum terms are 22 = 4. Similarly, for 3 variable equations, the
sum terms are 23 = 8.
Table for 2n min terms and 2n max terms
The below table will make you understand about the representation of the mean terms and max
terms of 3 variables.
3. K-Map
Karnaugh Map or K-map is introduced by a telecom engineer, Maurice Karnaugh at Bell labs
in 1953, as a refined technique of ‘Edward Veitch’s Veitch diagram’ and it is a method to
simplify or reduce the complexities of a Boolean expression.
Karnaugh map method or K-map method is the pictorial representation of the Boolean
equations and Boolean manipulations are used to reduce the complexity in solving them.
These can be considered as a special or extended version of the ‘Truth table’.
Karnaugh map can be explained as “An array containing 2k cells in a grid like format, where
k is the number of variables in the Boolean expression that is to be reduced or optimized”. As
it is evaluated from the truth table method, each cell in the K-map will represent a single row
of the truth table and a cell is represented by a square.
The cells in the k-map are arranged in such a way that there are conjunctions, which differs
in a single variable, are assigned in adjacent rows. The K-map method supports the
elimination of potential race conditions and permits the rapid identification.
By using Karnaugh map technique, we can reduce the Boolean expression containing any
number of variables, such as 2-variable Boolean expression, 3-variable Boolean expression,
4-variable Boolean expression and even 7-variable Boolean expressions, which are complex
to solve by using regular Boolean theorems and laws.
Minimization with Karnaugh Maps and advantages of K-map
● K-maps are used to convert the truth table of a Boolean equation into minimized SOP
form.
● Easy and simple basic rules for the simplification.
● The K-map method is faster and more efficient than other simplification techniques of
Boolean algebra.
● All rows in the K-map are represented by using a square shaped cells, in which each
square in that will represent a minterm.
● It is easy to convert a truth table to k-map and k-map to Sum of Products form equation.
Grouping of K-map variables
● There are some rules to follow while we are grouping the variables in K-maps. They are
● The square that contains ‘1’ should be taken in simplifying, at least once.
● The square that contains ‘1’ can be considered as many times as the grouping is possible
with it.
● Group shouldn’t include any zeros (0).
● A group should be the as large as possible.
● Groups can be horizontal or vertical. Grouping of variables in diagonal manner is not
allowed.
● If the square containing ‘1’ has no possibility to be placed in a group, then it should be
added to the final expression.
● Groups can overlap.
● The number of squares in a group must be equal to powers of 2, such as 1, 2, 4, 8 etc.
● Groups can wrap around. As the K-map is considered as spherical or folded, the squares
at the corners (which are at the end of the column or row) should be considered as they
adjacent squares.
● The grouping of K-map variables can be done in many ways, so they obtained simplified
equation need not to be unique always.
● The Boolean equation must be in must be in canonical form, in order to draw a K-map.
2 variable K-maps
There are 4 cells (22)in the 2-variable k-map. It will look like (see below image)
The possible min terms with 2 variables (A and B) are A.B, A.B’, A’.B and A’.B’. The
conjunctions of the variables (A, B) and (A’, B) are represented in the cells of the top row and
(A, B’) and (A’, B’) in cells of the bottom row. The following table shows the positions of all the
possible outputs of 2-variable Boolean function on a K-map.
In this K-map, we can create 2 groups by following the rules for grouping, one is by combining
(X’, Y) and (X’, Y’) terms and the other is by combining (X, Y’) and (X’, Y’) terms. Here the
lower right cell is used in both groups. After grouping the variables, the next step is determining
the minimized expression.
By reducing each group, we obtain a conjunction of the minimized expression such as by taking
out the common terms from two groups, i.e. X’ and Y’. So the reduced equation will be X’ +Y’.
3 variable K-maps
For a 3-variable Boolean function, there is a possibility of 8 output min terms. The general
representation of all the min terms using 3-variables is shown below.
A typical plot of a 3-variable K-map is shown below. It can be observed that the positions of
columns 10 and 11 are interchanged so that there is only change in one variable across adjacent
cells. This modification will allow in minimizing the logic.
Up to 8 cells can be grouped in case of a 3-variable K-map with other possibilities being 1,2 and
4.
Example
Simplify the given 3-variable Boolean equation by using k-map.
F = X’ Y Z + X’ Y’ Z + X Y Z’ + X’ Y’ Z’ + X Y Z + X Y’ Z’
First, let’s construct the truth table for the given equation,
The 2 size group has no common variables, so they are written with their variables and its
conjugates. So the reduced equation will be X Z’ + Y’ + X’ Z. In this equation, no further
minimization is possible.
4 variable K-maps
There are 16 possible min terms in case of a 4-variable Boolean function. The general
representation of minterms using 4 variables is shown below.
A typical 4-variable K-map plot is shown below. It can be observed that both the columns and
rows of 10 and 11 are interchanged.
The possible number of cells that can be grouped together are 1, 2, 4, 8 and 16.
Example
Simplify the given 4-variable Boolean equation by using k-map. F (W, X, Y, Z) = (1, 5, 12, 13)
Sol: F (W, X, Y, Z) = (1, 5, 12, 13)
Examples .