DE Unit2 Part2
DE Unit2 Part2
DE Unit2 Part2
Unit–2(Part-2)
Binary Logic and Boolean
Algebra
Dr. Anand J. Patel
Canonical and Standard Forms
• Boolean functions expressed as a sum of minterms (SOM) or product
of maxterms (POM) are said to be in canonical form.
• Boolean functions expressed as a sum of product (SOP) or product of
sum (POS) are said to be in standard form.
• Nonstandard Form: Boolean functions are also sometimes expressed
in nonstandard forms, which is neither a sum of products form nor a
product of sums form.
• E.g. F=(AB + CD)(A’B’ + C’D’)
Canonical Forms
• Sum term:
It is the logical sum of various terms of a function. The variable may be in the complemented or uncomplemented
form.
E.g. A+B’+C+D, A+B’
• Product term:
It is the logical product of various terms of function. The variables in product term may be in the complemented
or uncomplemented form.
E.g. A’BC, ABCD’
Number A B C F
1-Minterm; 0-Maxterm
0 0 0 0 0 (Maxterm)
1 0 0 1 0
2 0 1 0 0
3 0 1 1 1 (Minterm)
4 1 0 0 0
5 1 0 1 1
6 1 1 0 1
7 1 1 1 0
Solution: Sum of Minterm (SOM)
• Observe that the output is high for the rows labelled 3, 5 and 6.
• The SOM expression for this circuit is thus given by any of the
following:
• F = A’BC + AB’C + ABC’
• F = m3 + m5 +m6
• F = ∑m (3,5,6)
Solution: Product of Maxterm (POM)
• The POM expression is the equation of the logic function as read off the
truth table to specify the input combinations when the output is a logical 0.
• Let us again consider Table.
• Observe that the output is low for the rows labeled 0, 1, 2, 4 and 7.
• The POM expression for this circuit is thus given by any of the following:
A + B’ = A (B + B’) + ( A + A’) B’
= AB + AB’ + AB’ + A’B’
= AB + AB’ +A’B’
= m3 + m2 + m0
= m0 + m2 + m3
= ∑m (0,2,3)
So, AB + AB’ + A’B’ is the SOM for the function Y(A,B) = A+B’
Conversion to Canonical Product of Maxterms
• Any Boolean Function can be expressed as a Product of Maxterms (POM).
• For the function table, the maxterms used are the terms corresponding to the 0's.
• For conversion, expand all terms first to explicitly list all maxterms.
• Do this by first applying the second distributive law ,
• Then “ORing” terms missing variable v with a term equal to (v.v’)
• and then applying the distributive law again.
• Example: Convert to product of maxterms: f ( x, y, z ) = x + x y
Apply the distributive law:
x + x y = (x + x )(x + y ) = 1 (x + y ) = x + y
Add missing variable z:
x + y + z z = ( x + y + z ) (x + y + z )
Express as POM: f = M2 · M3
Another POM Example
• Convert to Product of Maxterms:
f(A, B, C) = A C + B C + A B
• Use x + y z = (x+y)·(x+z) with x = (A C + B C), y = A , and z =B to get:
• F = (AC’ + BC + A’)(AC’ + BC + B’ )
• Then use x + x’y = x + y to get:
f = ( C + BC + A )(A C + C + B )
and a second time to get:
f = ( C + B + A )(A + C + B )
• Rearrange to standard order,
f = ( A + B + C )(A + B + C) to give f = M5 · M2
Example:
Obtain POM for the function Y(A, B, C) = ( A+B) (A+B’) (B’+C’)
Function Complements
• The complement of a function expressed as a sum of minterms is
constructed by selecting the minterms missing in the sum-of-
minterms canonical forms.
• Alternatively, the complement of a function expressed by a Sum of
Minterms form is simply the Product of Maxterms with the same
indices.
• Example: Given F ( x , y , z ) = m ( 1, 3 , 5 , 7 )
1. Complexity reduced
2. Cost less
3. Less wiring (Connection)
4. Fault finding easy
5. Less Components etc.
Karnaugh Map (K-Map)
• Simplification of Boolean functions can be made using Boolean
algebra and De Morgan's theorems. This method is tedious and not
systematic.
For the case of 2 variables, we form a map consisting of 22=4 cells as shown in Figure
A A A
0 1 0 1 0 1
B B B
0 A+ B A + B 0 00 10 0 AB AB
0 2
A+ B A + B 01 11
1 1
1 3
1
A B AB
Maxterm Minterm
Three Variable K-map
Three Variable K-map
Cells = 23=8
AB
C 00 01 11 10
0 2 6 4
0
A B C A BC ABC AB C
1 3 7 5
1 A B C A BC ABC AB C
Four Variable K-map
Four Variable K-map
Cells = 24=16
AB
CD 00 01 11 10
0 4 12 8
00
1 5 13 9
01
3 7 15 11
11
2 6 14 10
10
2-3-4 Variable K-map
Representation of function on K-map
• In order to show the function on K-map, it should be in form of
minterms.
• If it is not in that form it should be brought into the required form
with the help of Boolean algebra.
• Then binary numbers and their equivalent decimal numbers of
function are written .
• 1 is written in those cells in which the product term of the function
is in the decimal form.
• 0 is written in the remaining cells.
Simplification of K-map
• To simplify a SOP of a Boolean expression using a K-map:
• First identify all the input combinations that produce an output of logic
level 1 and place them in their appropriate K-map cell. Consequently, all
other cells must contain zero (0).
• Second, group the adjacent cells that contain 1 in a manner that maximizes
the size of the groups but also minimizes the total number of groups. All 1's
in the output must be included in a group even if the group is only one cell.
• Third, as each SOP term represents an AND expression, each ( AND )
grouping is written with only the input variables that are common to the
group.
• Finally, the simplified expression is formed by ORing each of the ( AND )
groups (SOP).
Simplification of K-map
• For simplification of K-map it is necessary to understand some basic
terms like:
• pair
• quad
• octet
• overlapping of group
• rolling of K-map
• redundant group
The Pair
• In K-map if there are adjacent 1 in the vertical or horizontal
direction, it is called pair.
• This pair is shown by closed loop.
• From the K-map
• Y = ACD’ + A’B’D
The Quad
• If in K-map there are four number of 1 side by side or they form a
square , it is called the quad.
• From the K-map
• Y = BC’ + CD’
The Octet
• In K-map when there are 8 numbers of 1 side by side, it is called octet.
• From the K-map
• Y=C
Over lapping groups(1)
• In K-map when we encircle the group, sometimes 1 comes in more
then one loop. This is allowed. On the contrary it is advisable too.
This is called overlapping group.
• For fig (a)
• Y = ABD + CD
Over lapping groups(2)
• In K-map when we encircle the group, sometimes 1 comes in more
then one loop. This is allowed. On the contrary it is advisable too.
This is called overlapping group.
• For fig (b)
• Y= ABC’D + CD
Rolling the map(1)
• When in the first column and in the last column there are 1 in the
same row, more variables can be eliminated and more simplified
form of switching function is obtained.
• For Fig (a)
• Y = A’B’C’D + AB’C’D
Rolling the map(2)
• When in the first column and in the last column there are 1 in the
same row, more variables can be eliminated and more simplified
form of switching function is obtained.
• For Fig (b)
• Y = B’C’D
Redundant group(1)
• When all the 1 of a group are overlapped by other groups then that
group is called the redundant group.
• For fig (a)
• Y = A’B’C’ + A’C’D + A’BD
Redundant group(2)
• When all the 1 of a group are overlapped by other groups then that
group is called the redundant group.
• For fig (b)
• Y = A’B’C’ + A’BD
Don’t care condition
• Normally for the definite input logic condition (0 or 1), there is
definite output logic condition.
• Some times the logic circuit is such that for any condition of the
input, there is no change in the output condition.
• Such condition is called the don’t care condition.
• In K-map it is shown not by 0 or 1, but it is shown by X.
• X can be taken either 0 or 1 depending upon the requirement.
• If X is beside 1, we can take it equal to 1 so as to make a pair. With
this the expression becomes simple.
• Note: All X need not be used in simplification.
Example: Don’t care condition
• From the K-map
• Y = A’B’C’ + C’D
Note: All 1’s must be included but all X need not be used in simplification.
Example
2-variable Karnaugh maps are trivial but can be used to introduce
the methods you need to learn. The map for a 2-input OR gate looks
like this:
A
0 1
B
A
Y 0 1
B
A
1 1 1
A B Y
0 0 0
B
0 1 1
1 0 1
A+B
1 1 1
Example
3-variable Karnaugh maps:
AC
AB
A B C Y C 00 01 11 10
0 0 0 1 0 1 1 1
0 0 1 1
0 1 0 0 1 1 1
0 1 1 0
1 0 0 1
1 0 1 1
B
1 1 0 1
1 1 1 0 B + AC
Example:
• For the given truth table draw the K-map for the Function F and
reduce it.
Input Output
A B C F
0 0 0 1
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 X
1 1 0 X
1 1 1 x
Solution:
• F = C + A’B’
AB
C 00 01 11 10
1 0 2
X 6 4
0
1 1 1 3
X 7
X 5
1
Note: All 1’s must be included but all X need not be used in simplification.
Truth-table to K-map
Example: Don’t care condition
Note: All 1’s must be included but all X need not be used in simplification.
AB
CD 00 01 11 10
X
00
01
X 1
11 X X
10 X X
AD
Example
For the given truth table express the function F in SOM form and
reduce F using K-map.
Solution
• The above table can be described by
F = m(0, 2, 3, 5, 6, 7, 8, 10, 11, 14, 15)
• The function can be written as:
F = A’B’C’D’ + A’B’CD’ + A’B’CD + A’BC’D + A’BCD’ + A’BCD + AB’C’D’ +
AB’CD’ + AB’CD + ABCD’ + ABCD
• Each term on the RHS is a minterm.
• The above function can be simplified by using the K-map.
• Insert 1 in those cells where the function F has a value of 1. Put 0 in
the other cells.
Solution(contd.):
• F = m(0, 2, 3, 5, 6, 7, 8, 10, 11, 14, 15)
• F = B'D' + C + A'BD AB
CD 00 01 11 10
1 0
0 4
0 12 1 8
00
01
0 1
1 5
0 13
0 9
11 1 3
1 7
1 15
1 11
10 1 2
1 6
1 14
1 10
1 0
0 4
0 12 1 8
00
01
0 1
1 5
0 13
0 9
11 1 3
1 7
1 15
1 11
10 1 2
1 6
1 14
1 10
AB
CD 00 01 11 10
0 1 3 2 1 0 4 12 18
00
1 13
4 5 7 6
01 1 5 9
3 7 15 11
12 13 15 14
11 1 1 1 1
8 2 6 14 10
9 11 10
10 1 1 1 1
Example using other nomenclature
F=∑ m(0,2,8,9,10,11,14,15)
F= A.B’+A.C+B’.D’
Example using other nomenclature
Full-adder:
A B C S Carry
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
Carry= A.C+A.B+B.C
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
S=A.B’.C’ + A’.B’.C+A.B.C+A’.B.C’
Implicants
• Implicants
Implicant is a product/minterm term in Sum of Products (SOP) or sum/maxterm
term in Product of Sums (POS) of a Boolean function.
E.g.For a boolean function, F = AB + ABC + BC. Implicants are AB, ABC and BC.
• Prime Implicants
A group of square or rectangle made up of bunch of adjacent minterms which is
allowed by definition of K-Map are called prime implicants(PI) i.e. all possible
groups formed in K-Map.
• Essential Prime Implicants –
These are those subcubes(groups) which cover atleast one minterm that can’t be
covered by any other prime implicant. Essential prime implicants(EPI) are those
prime implicants which always appear in final solution.
Implicants (contd.)
• Redundant Prime Implicants
The prime implicants for which each of its minterm is covered by
some essential prime implicant are redundant prime implicants(RPI).
This prime implicant never appears in final solution.
Example
• Given F = ∑(3, 4, 5, 7, 9, 13, 14, 15), find number of implicants, PI, EPI,
RPI and SPI.
• F = A’BC’+ A’CD + ABC + AC’D
Minimal Expression
• How the minimum expression of a function is determined using a
Karnaugh Map?
• The concept of prime implicants can be used to determine the
minimum solution.
• The minimum SOP expression for a function consists of some (but not
necessarily all) of the prime implicants of a function.
• In other words, a SOP expression containing a term, which is not an
essential prime implicant (EPI), cannot be the minimum. This is true
because if a non EPI term were present, the expression could be
simplified by combining it with additional minterms.
Minimal Expression(contd.)
• Any set of implicants that encloses (covers) all values (1 for SOP and 0
for POS) is "sufficient"; i.e. the associated logical expression
represents the desired function. For example, all minterms or
maxterms are sufficient.
• However, the smallest set of prime implicants (i.e.EPI) that covers all
values forms a minimal expression for the desired function.
• There may be more than one minimal set.
Example
• F(A,B,C,D) = m(3, 9, 11, 12, 13,14, 15) + d (1, 4, 6)
• F(A,B,C,D) = B'D + AB (SOP- WITH DON’T CARE)
AB
CD 00 01 11 10
0
X 4
1 12 8
00
01
X 1 5
1 13
1 9
11 1 3 7
1 15
1 11
10
2
X 6
1 14 10
Example
• m(3, 9, 11, 12, 13,14, 15) + d (1, 4, 6)
• F(A,B,C,D) = B'CD + AD + AB (SOP- WITHOUT DON’T CARE)
AB
CD 00 01 11 10
0
X 4
1 12 8
00
01
X 1 5
1 13
1 9
11 1 3 7
1 15
1 11
10
2
X 6
1 14 10
NAND/NOR implementation of Boolean function
• Logic circuit is drawn from the function obtained from K-map .
• This function is in form of SOP or POS.
• Logic circuit can be realized making use of A-O-I gates.
• The logic circuit can be realized making use of NAND gate only when
the function is in SOP form.
• It can be realized making use of NOR gate only when the function is
in the POS form.
Example: NAND gate implementation
• Draw the logic circuit for the function Y = AB + A’C’ + B’C making use
of NAND gates only
• To realize the circuit using NAND only, let us make use of property:
f = (f’)’
• To realize the circuit using NOR only , let us make use of property:
f = (f’)’
Inputs Output
A B C X X = (3, 5, 6, 7)
0 0 0 0 0
1 0 0 1 0 X
BC
2 0 1 0 0 A 00 01 11 10
3 0 1 1 1 0 0 0 1 0
4 1 0 0 0 1 0 1 1 1
5 1 0 1 1
6 1 1 0 1
7 1 1 1 1 X = AC + AB + BC
A B C
The End