DLD Unit-Ii
DLD Unit-Ii
UNIT-2
Postulates
• Closure: A set S is closed with respect to a binary operator if,
for every pair of elements of S, the binary operator specifies for
obtaining an unique element of S.
3
Postulates and theorems of Boolean algebra
4
Some basic logical Boolean operations,
AND Operation OR Operation NOT Operation
A.0=0 A+0=A
A.1=A A+1=1
A.A=A A+Ā=1
A.Ā=0 A+A=A
Double Complementation Law 5
AND Laws OR Laws
• Associative law: A binary operator * on a set S is said to be associative
whenever
( x * y ) * z = x * (y * z)
• Commutative law: A binary operator * on a set S is said to be
commutative when
x*y=y*x
• Identity element: A set S is said to have identity element with respect to
the binary operator * on S if there exists an element eєS with property
that
e* x = x * e = x for any x
• Inverse: A set S having the identity element e with respect to a binary
operator * is said to have an inverse whenever for every xєS, there exists
en element y єS such that x * y = e
Associative Laws
Distributive Laws
7
Redundant Literal Rule
Inputs Output Inputs Output
A B ĀB A + ĀB A B A+B
0 0 0 0 0 0 0
0 1 1 1 0 1 1
1 0 0 1 1 0 1
1 1 0 1 1 1 1
Absorption Law
Inputs Output
A B AB A+A.B
0 0 0 0
0 1 0 0
8
1 0 0 1
1 1 1 1
De Morgan’s Theorem
Consensus Theorem
1
0
DUALITY Operator /
Variable
Dual
AND OR
Dual expression is equivalent to write a negative logic
OR AND
of the given Boolean relation. For this,
1 0
i. Change each OR sign by AND sign and vice-versa.
0 1
ii. Complement any 0 or 1 appearing in the expression.
A A
iii. Keep literals as it is.
X + (Y + Z) = (X + Y) + Z X . (Y . Z) = (X . Y) . Z
X.(Y + Z) = X.Y + X.Z X + (Y.Z) = (X+Y).(X+Z)
Given Expression Dual Given Expression Dual
1
2
COMPLEMENT
For obtaining complement expression,
i. Change each OR sign by AND sign and vice-versa.
ii. Complement any 0 or 1 appearing in the expression.
iii. Complement the individual literals.
Complement of A(B+C) is A’+(B’.C’) A’+B’.A’+C’
Complement of A+B+C is A’.B’.C’ which is Demorgan’s theorem
Step 1 − In first and second terms r is common and in third and fourth terms pq is common.
So, take the common terms by using Distributive law.
⇒ f = (p′q+pq′)r+pq(r′+r)
Step 2 − The terms present in first parenthesis can be simplified to Ex-OR operation. The
terms present in second parenthesis can be simplified to ‘1’ using Boolean postulate
⇒ f = (p⊕q)r + pq(1)
Step 3 − The first term can’t be simplified further. But, the second term can be simplified to
pq using Boolean postulate.
⇒ f = (p⊕q)r + pq 1
4
1
6
Simplification of Boolean Expression using
Theorems
1
7
Simplification of Boolean Expression using
Theorems
1
8
Simplification of Boolean Expression using
Theorems
1
9
Boolean functions
• A Boolean function is described by an algebraic
expression consisting of binary variables, the constants 0
and 1, and the logic operation symbols.
23
Example – 1:
2
4
Example – 2:
2
5
Canonical and Standard form
• Canonical Form – In Boolean algebra, Boolean function can be expressed as Canonical Disjunctive Normal
Form known as minterm and some are expressed as Canonical Conjunctive Normal Form known
as maxterm. In Minterm, we look for the functions where the output results in “1” while in Maxterm we
look for function where the output results in “0”. Sum of Minterm also known as Sum of products (SOP).
Product of Maxterm also known as Product of sum (POS). Boolean functions expressed as a sum of
minterms or product of maxterms are said to be in canonical form.
• Standard Form – A Boolean variable can be expressed in either true form or complemented form. In
standard form Boolean function will contain all the variables in either true form or complemented form
while in canonical number of variables depends on the output of SOP or POS.
A Boolean function can be expressed algebraically from a given truth table by forming a :
– minterm for each combination of the variables that produces a 1 in the function and then taking the
AND of all those terms.
– maxterm for each combination of the variables that produces a 0 in the function and then taking the
OR of all those terms.
In standard form Boolean function will contain all the variables in either true form or 2
complemented form while in canonical number of variables depends on the output of SOP or POS. 6
Standard Form
• In this, the Boolean function may contain any number of literals (no stringent rules as
in the case of canonical form)
F(x,y,z) = x+y’z
F(x,y,z) = xy+x’z
The above two functions are in standard form but not in canonical form.
3
1
Canonical form
• A function expressed as sum of min terms (SOP) or
product of max terms (POS) is said to be in canonical
form.
• To convert a Boolean function into canonical form,
identity element theorem has to be used.
3
2
Example – Express the Boolean function F = A + B’C as standard sum of minterms.
• Solution –
The first term is having only one variable A ; hence, A = A(B + B’) = AB + AB’
This function is still missing one variable, so
A = AB(C + C’) + AB'(C + C’) = ABC + ABC’+ AB’C + AB’C’
The second term B’C is missing one variable; hence,
B’C = B’C(A + A’) = AB’C + A’B’C
Combining all terms, we have
F = A + B’C = ABC + ABC’ + AB’C + AB’C’ + AB’C + A’B’C
But AB’C appears twice, and according to theorem 1 (x + x = x), it is possible to remove one of
those occurrences. Rearranging the minterms in ascending order, we finally obtain
F = A’B’C + AB’C’ + AB’C + ABC’ + ABC
= m1 + m4 + m5 + m6 + m7
SOP is represented as Sigma(1, 4, 5, 6, 7)
3
3
Example: Express the function F(x,y,z) = x+y’z in canonical form.
• Solution:
The first term is not a minterm. So, convert it into a minterm.
x = x (y + y’) (z + z’) = xyz+xyz’+xy’z+xy’z’
3
5
3
6
• Solution:
3
7
Conversion from one form to another form: (using DeMorgan’s Law)
• Example – F(A, B, C) = Sigma(1, 4, 5, 6, 7)
F'(A, B, C) = Sigma(0, 2, 3) = m0 + m2 + m3
OR x x+y
y
NAND x xy
y
NOR x x+y
y
XOR x xÅy
y 3
9
Logic gates
● Logic gates are the fundamental building blocks of digital systems.
● The name logic gate is derived from the ability of such a device to make decisions,
in the sense that it produces one output level when some combinations of input
levels are present, and a different output level when other combinations of input
levels are present.
● Inputs and outputs of logic gates can occur only in two levels. These two levels are
termed as HIGH and LOW, or TRUE and FALSE, or ON and OFF, or simply 1 and 0.
● There are three basic logic gates. AND, OR and NOT.
● There are two universal logic gates. NAND and NOR.
● There are two derived logic gates. XOR and XNOR.
4
0
AND Gate:
• AND gate has two or more inputs but only one output.
• AND gate is a gate whose output is 1, if and only if all its inputs are 1.
• The symbol of AND operation is ‘.’
• The logic symbol and truth table of a two input AND gate are shown below.
A B Y
0 0 0
0 1 0
1 0 0
4
1 1 1 1
OR Gate:
• OR gate has two or more inputs but only one output.
• OR gate is a gate whose output is 1, if any one of the input is 1. Hence it is called
any or all gate.
• The symbol of OR operation is ‘+’
• The logic symbol and truth table of a two input OR gate are shown below.
A B Y
0 0 0
0 1 1
1 0 1
4
1 1 1 2
NOT Gate:
• NOT gate has one input and one output.
• NOT gate is also called an inverter. It’s output is always the complement of input.
• The symbol of NOT operation is ‘-’ (bar).
• The logic symbol and truth table of NOT gate are shown below.
Input Output
A Y
0 1
1 0
4
3
NAND Gate:
• NAND gate has two or more inputs but only one output.
• NAND gate is a gate whose output is 0, if and only if all its inputs are 1.
• NAND means NOT AND. i.e., the AND output is NOTed.
• The logic symbol and truth table of a two input NAND gate are shown below.
Inputs Output
A B Y
0 0 1
0 1 1
1 0 1
4
1 1 0 4
NOR Gate:
• NOR gate has two or more inputs but only one output.
• NOR gate is a gate whose output is 1, if all the inputs are 1.
• NOR means NOT OR. i.e., the OR output is NOTed.
• The logic symbol and truth table of a two input NOR gate are shown below.
Inputs Output
A B Y
0 0 1
0 1 0
1 0 0
4
1 1 0 5
XOR Gate:
• XOR gate has two inputs but only one output.
• XOR gate is a gate whose output is 1, if both the inputs are different. Hence it is
called anti-coincidence gate or inequality detector.
• The logic symbol and truth table of a two input XOR gate are shown below.
Inputs Output
A B Y
0 0 0
0 1 1
1 0 1
4
1 1 0 6
XNOR Gate:
• XNOR gate has two inputs but only one output.
• XNOR gate is a gate whose output is 1, if both the inputs are same. Hence it is
called coincidence gate or equality detector.
• The logic symbol and truth table of a two input XOR gate are shown below.
Inputs Output
A B Y
0 0 1
0 1 0
1 0 0
4
1 1 1 7
4
8
NAND Gate as Universal Gate:
4
9
5
0
NOR Gate as Universal Gate:
5
1
5
2
Equivalent Gates:
NAND = Bubbled OR
OR = Bubbled NAND
5
3
XOR gate as an inverter: XNOR gate as an inverter:
A B Y A B Y
0 0 0 0 0 1
0 1 1 0 1 0
1 0 1 1 0 0
1 1 0 1 1 1
5
4
Properties of Exclusive-OR Gate:
5
5
Example – 1: Find the logical equivalent of the following expressions
5
6
Example – 2: Find the logical equivalent of the following expressions
5
7
XOR Gate using NAND:
F = A XOR B = A’B+AB’ = A’B+AB’+AA’+BB’ = (A+B) (A’+B’)
Take compliment
F’ = ( A. (AB)’ + B. (AB)’ )’ = (A. (AB)’)’. (B. (AB)’)
Take compliment
F = ( A’(A+B) + B’(A+B) )’ = (A’. (A+B))’. (B’. (A+B))’
= (A+(A+B)’).(B+(A+B)’)
6
0
Converting AND-OR-INVERT logic to NAND/NOR logic:
Convert the following AOI logic circuit to (a) NAND logic (b) NOR logic
6
1
6
2
6
3
Example – 1: Implement the following SOP function
F = XZ+Y’Z+X’YZ
6
4
Example – 2: Implement the following POS function
F = (X+Z).(Y’+Z).(X’+Y+Z)
6
5
Example – 3: Draw the simplest possible logic diagram that
Implements the output of the logic diagram shown below
6
6
Karnaugh Map (K-Map)
It is a graphical method, which consists of 2n cells for ‘n’ variables. The adjacent cells are
differed only in single bit.
K-Map method is most suitable for minimizing Boolean functions of 2 variables to 5
variables.
2-variable K-Map:
The number of cells in 2 variable K-map is four, since the number of variables is two. The
following figure shows 2 variable K-Map.
• There is only one possibility of grouping 4 adjacent min terms.
• The possible combinations of grouping 2 adjacent min terms are {(m0, m1), (m2, m3), (m0,
m2) and (m1, m3)}.
6
7
Karnaugh Map (K-Map)
3-variable K-Map:
The number of cells in 3 variable K-map is eight, since the number of variables is three. The
following figure shows 3 variable K-Map.
• There is only one possibility of grouping 8 adjacent min terms.
• The possible combinations of grouping 4 adjacent min terms are {(m0, m1, m3, m2), (m4, m5, m7,
m6), (m0, m1, m4, m5), (m1, m3, m5, m7), (m3, m2, m7, m6) and (m2, m0, m6, m4)}.
• The possible combinations of grouping 2 adjacent min terms are {(m0, m1), (m1, m3), (m3, m2), (m2,
m0), (m4, m5), (m5, m7), (m7, m6), (m6, m4), (m0, m4), (m1, m5), (m3, m7) and (m2, m6)}.
• If X=0, then 3 variable K-map becomes 2 variable K-map.
6
8
Karnaugh Map (K-Map)
4-variable K-Map:
The number of cells in 4 variable K-map is sixteen, since the number of variables is four. The
following figure shows 4 variable K-Map.
• There is only one possibility of grouping 16 adjacent min terms.
• Let R1, R2, R3 and R4 represents the min terms of first row, second row, third row and fourth row
respectively. Similarly, C1, C2, C3 and C4 represents the min terms of first column, second column,
third column and fourth column respectively. The possible combinations of grouping 8 adjacent
min terms are {(R1, R2), (R2, R3), (R3, R4), (R4, R1), (C1, C2), (C2, C3), (C3, C4), (C4, C1)}.
• If W=0, then 4 variable K-map becomes 3 variable K-map.
6
9
Karnaugh Map (K-Map)
5-variable K-Map:
The number of cells in 5 variable K-map is thirty-two, since the number of variables is 5. The
following figure shows 5 variable K-Map.
• There is only one possibility of grouping 32 adjacent min terms.
• There are two possibilities of grouping 16 adjacent min terms. i.e., grouping of min terms from
m0 to m15 and m16 to m31.
• If V=0, then 5 variable K-map becomes 4 variable K-map.
7
0
In the above all K-maps, we used exclusively the min terms notation. Similarly, we can also use
exclusively the Max terms notation.
K-Map:
Example – 1: Reduce the expression A’B’+A’B+AB using map method.
7
1
K-Map:
Example – 2: Reduce the expression (A + B)(A + B’)(A’ + B’) using mapping.
7
2
K-Map:
Example – 3: Reduce the expression ∑ m (0,2,3,4,5,6) using mapping and implement it in AOI logic as
well as in NAND logic.
7
3
K-Map:
Example – 4: Reduce the expression ∏ M (0,1,2,3,4,7) using mapping and implement it in AOI logic as
well as in NOR logic.
7
4
K-Map:
Example – 5: Obtain the real minimal expression for ∑ m (1,2,4,6,7) and implement it using universal gates.
7
5
K-Map:
Example – 6: Reduce using mapping the expression ∑ m (0-3,5,7-10,12,13) and implement it in
universal logic.
7
6
K-Map:
Example – 7: Reduce the following expression using mapping ∑ m (0,2,3,10-13,16-21,26,27).
7
7
K-Map: Example – 7: Reduce the following expression using mapping ∑ m (0,2,3,10-13,16-21,26,27).
7
8
K-Map:
Example – 8: Reduce the following expression using mapping ∑ m (1,3,6,7).
7
9
K-Map:
Example – 9: Reduce the following expression using mapping ∏ M (0,3,6,7).
8
0
K-Map:
Example – 10: Reduce the following expression using mapping ∏ M (3,5,7,8,10,11,12,13).
Prime implicant
Essential prime implicant
Redundant prime implicant
Selected prime implicant
Isolated one
Also, in design of 4-bit BCD-to-XS-3 code converter, the input combinations 1010, 1011, 1100,
1101, 1110, and 1111 are don’t cares.
A standard SOP function having don’t cares can be converted into a POS expression by
keeping don’t cares as they are, and writing the missing min-terms of the SOP form as the
max-term of POS form. Similarly, a POS function having don’t cares can be converted to SOP
form keeping the don’t cares as they are and write the missing max-terms of the POS 8
3
expression as the min-terms of SOP expression.
K-Map with don’t cares:
Example – 1: Minimize the following function in SOP minimal form using K-Maps
F = ∑ m(1,5,6,12,13,14) + d(4)
8
Therefore, SOP minimal is, F = BC' + BD' + A'C'D 4
K-Map with don’t cares:
Example – 2: Minimize the following function in POS minimal form using K-Maps
F(A,B,C,D) = ∑ m(0-5) + d(10-15)
8
Therefore, POS minimal is, F = A’ (B’ + C’) 5
TABULAR METHOD (QUINE-McCLUSKEY METHOD)
Procedure for Finding the Minimal Expression:
• Arrange all minterms in groups, such that all terms in the same group have same number of 1’s in their
binary representation. Start with the least number of 1’s and continue with grouping of increasing
number of 1’s, the number of 1’s in each term is called the index of that term i.e., all the minterms of
same index are placed in a same group. The lowest value of index is zero. Separate each group by a
thick Line. This constitutes the I stage.
• Compare every term of the lowest index (say i) group with each term in the successive group of index
(say, i + 1). If two minterms differ in only one variable, that variable should be removed and a dash (–) is
placed at the position, thus a newterm with one less literal is formed. If such a situation occurs, a check
mark (✔) is placed next to both minterms. After all pairs of terms with indices i and (i + 1) have been
considered, a thick line is drawn under the last terms. When the above process has been repeated for all
the groups of I stage, one stage of elimination have been completed. This constitutes the II stage.
8
6
TABULAR METHOD (QUINE-McCLUSKEY METHOD)
Procedure for Finding the Minimal Expression:
• The III stage of elimination should be repeated of the newly formed groups of second stage. In this
stage, two terms can be compared only when they have dashes in same positions.
The process continues to next higher stages until no further comparisons are possible. (i.e., no further
elimination of literals).
• All terms which remain unchecked (No ✔ sign) during the process are considered to be prime
implicants (PIs). Thus, a set of all PIs of the function is obtained.
• From the set of all prime implicates, a set of essential prime implicants (EPIs) must be determined by
preparing prime implicant chart as follow.
(a) The PIs should be represented in rows and each minterm of the function in a column.
(b) Crosses should be placed in each row corresponding to minterms that makes the PIs.
(c) A complete PIs chart should be inspected for columns containing only a single cross. PIs that cover
minterms with a single cross in their column are called EPIs. All the minterms have been covered by
EPIs.
• The minterms which are not covered by the EPIs are taken into consideration and a minimum cover is
obtained fr0m the remaining PIs.
8
7
TABULAR METHOD –Binary Method
Simplify the given function using tabular method.F (A, B, C, D) = = ∑ m (0,1,6,7, 8,9,13,14,15)
8
8
TABULAR METHOD
Prime Implicant Chart
PIs/Minterms ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔
0 1 6 7 8 9 13 14 15
R --> 13,15(2) X X
S--> 9,13(4) X X
9
0
TABULAR METHOD
Simplify the given function using tabular method.F (A, B, C, D) = = ∑ m (0, 2, 3, 6, 7, 8, 10, 12, 13)
9
1
TABULAR METHOD
Simplify the given function using tabular method.F (A, B, C, D) = = ∑ m (0, 2, 3, 6, 7, 8, 10, 12, 13)
Prime Implicant Chart
PIs/Minterms ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔
0 2 3 6 7 8 10 12 13
P 8,12(4) X X
*Q 12,13(1) X X
*R 0,2,8,10 (2,8) X X X X
*S 2,3,6,7(1,4) X X X X
9
3
TABULAR METHOD
Simplify the given function using tabular method.F (A, B, C, D) = = ∑ m (6, 7, 8, 9)+d(10,11,12,13,14,15)
Answer is P+Q=A+BC
9
4
9
5
References
• https://www.geeksforgeeks.org/canonical-and-standard-form
• Switching Theory and Logic Design by A. Anand Kumar
• https://www.tutorialspoint.com/computer_logical_organization/logic_gates.html
• https://www.geeksforgeeks.org/boolean-algebraic-theorems/
• https://www.electronicshub.org/boolean-algebra-laws-and-theorems/
• https://www.electrical4u.com/boolean-algebra-theorems-and-laws-of-boolean-
algebra/
9
6