0% found this document useful (0 votes)
9 views

Chapter 2 Boolean Expression

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Chapter 2 Boolean Expression

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

.

Laws of Boolean algebra


1. The basic Laws of Boolean Algebra can be stated as follows:

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.

Simplification using Boolean algebra

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}

Hence, the simplified Boolean function will be B + AC.


The logic diagram for Boolean function B + AC can be represented as:
2 Boolean Function Representation
The use of switching devices like transistors give rise to a special case of the Boolean algebra
called as switching algebra. In switching algebra, all the variables assume one of the two values
which are 0 and 1.
In Boolean algebra, 0 is used to represent the ‘open’ state or ‘false’ state of logic gate. Similarly,
1 is used to represent the ‘closed’ state or ‘true’ state of logic gate.
A Boolean expression is an expression which consists of variables, constants (0-false and 1-true)
and logical operators which results in true or false.
A Boolean function is an algebraic form of Boolean expression. A Boolean function of n-
variables is represented by f(x1, x2, x3….xn). By using Boolean laws and theorems, we can
simplify the Boolean functions of digital circuits. A brief note of different ways of representing a
Boolean function is shown below.
● Sum-of-Products (SOP) Form
● Product-of-sums (POS) form
● Canonical forms
There are two types of canonical forms:
● Sum-of-min terms or Canonical SOP
● Product-of- max terms or Canonical POS
Boolean functions can be represented by using NAND gates and also by using K-map (Karnaugh
map) method. We can standardize the Boolean expressions by using by two standard forms.
SOP form – Sum Of Products form
POS form – Product Of Sums form
Standardization of Boolean equations will make the implementation, evolution and
simplification easier and more systematic.
Sum of Product (SOP) Form
The sum-of-products (SOP) form is a method (or form) of simplifying the Boolean expressions
of logic gates. In this SOP form of Boolean function representation, the variables are operated by
AND (product) to form a product term and all these product terms are ORed (summed or added)
together to get the final function.
A sum-of-products form can be formed by adding (or summing) two or more product terms
using a Boolean addition operation. Here the product terms are defined by using the AND
operation and the sum term is defined by using OR operation.
The sum-of-products form is also called as Disjunctive Normal Form as the product terms are
ORed together and Disjunction operation is logical OR. Sum-of-products form is also called as
Standard SOP.

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.

A general representation of a 2 variable K-map plot is shown below.


When we are simplifying a Boolean equation using Karnaugh map, we represent the each cell of
K-map containing the conjunction term with 1. After that, we group the adjacent cells with
possible sizes as 2 or 4. In case of larger k-maps, we can group the variables in larger sizes like 8
or 16.
The groups of variables should be in rectangular shape, that means the groups must be formed by
combining adjacent cells either vertically or horizontally. Diagonal shaped or L-shaped groups
are not allowed. The following example demonstrates a K-map simplification of a 2-variable
Boolean equation.
Example
Simplify the given 2-variable Boolean equation by using K-map.
F = X Y’ + X’ Y + X’Y’
First, let’s construct the truth table for the given equation,

We put 1 at the output terms given in equation.

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,

We put 1 at the output terms given in equation.


There are 8 cells (23) in the 3-variable k-map. It will look like (see below image).
The largest group size will be 8 but we can also form the groups of size 4 and size 2, by
possibility. In the 3 variable Karnaugh map, we consider the left most column of the k-map as
the adjacent column of rightmost column. So the size 4 group is formed as shown below.
And in both the terms, we have ‘Y’ in common. So the group of size 4 is reduced as the
conjunction Y. To consume every cell which has 1 in it, we group the rest of cells to form size 2
group, as shown below.

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)

By preparing k-map, we can minimize the given Boolean equation as


F = W Y’ Z + W ‘Y’ Z

Examples .

You might also like