Professional Documents
Culture Documents
Unit 2
Unit 2
Unit 2
UNIT-2
A B Y
0 0 0
0 1 0
1 0 0
4
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.
• It can also be called an inclusive OR gate because it includes the condition ‘both the
inputs can be present’.
• The symbol of OR operation is ‘+’
• The logic symbol, truth table and Boolean expression of a two input OR gate are
shown below.
Inputs Output Y = A+B
A B Y
0 0 0
0 1 1
5
1 0 1
1 1 1
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, truth table and Boolean expression of NOT gate are shown
below.
Input Output Y=
A Y
0 1
1 0
6
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, truth table and Boolean expression of a two input NAND gate
are shown below.
Inputs Output Y=
A B Y
0 0 1
0 1 1
1 0 1
1 1 0 7
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 0.
• NOR means NOT OR. i.e., the OR output is NOTed.
• The logic symbol, truth table and Boolean expression of a two input NOR gate are
shown below.
Inputs Output Y=
A B Y
0 0 1
0 1 0
1 0 0
1 1 0 8
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, truth table and Boolean expression of a two input XOR gate are
shown below.
Inputs Output Y= +
A B Y
0 0 0
0 1 1
1 0 1
1 1 0 9
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, truth table and Boolean expression of a two input XOR gate are
shown below.
A B Y
0 0 1
0 1 0
1 0 0
1 1 1 10
11
Equivalent Gates:
NAND = Bubbled OR
OR = Bubbled NAND
12
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
13
Properties of Exclusive-OR Gate:
14
Example – 1: Find the logical equivalent of the following expressions
a) A 0
b) A 1
c) Aʘ0
d) Aʘ1
e) 1
f) 0
15
Example – 2: Find the logical equivalent of the following expressions
a) B
b) ʘB
c)
d) ʘ
e) A
f) Aʘ
16
BOOLEAN ALGEBRA
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 double complement of a variable
A.A=A A+Ā=1 is always equal to the variable
A.Ā=0 A+A=A
AND Laws OR Laws Double Complementation Law 17
BOOLEAN ALGEBRA
Commutative Laws
A+B=B+A
A.B=B.A
Associative Laws
Distributive Laws
18
BOOLEAN ALGEBRA
Idempotence Laws Transposition Theorem
A+A=A AB + = (A+C).(+B)
A.A=A
Identity Laws
A+1=1
A.1=A
Null Laws
A+0=A
A.0=0
19
BOOLEAN ALGEBRA
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 Laws
Inputs Output
A B AB A+A.B
0 0 0 0
0 1 0 0
20
1 0 0 1
1 1 1 1
BOOLEAN ALGEBRA
De Morgan’s Theorem
22
Demorganize
23
24
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.
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)
DUALITY
27
Simplification of Boolean Expression using
Theorems
Simplify the Boolean function, f = p’qr + pq’r + pqr’ + pqr
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 28
⇒ f = pq + qr + pr
Therefore, the simplified Boolean function is f = pq+qr+pr
Simplification of Boolean Expression using
Theorems
Simplify the Boolean function, f = A + B [AC + (B + C’)D]
30
Simplification of Boolean Expression using
Theorems
Reduce the expression
31
Simplification of Boolean Expression using
Theorems
Show that
32
Example – 1: Implement the following SOP function
F = XZ+Y’Z+X’YZ
33
Example – 2: Implement the following POS function
F = (X+Z).(Y’+Z).(X’+Y+Z)
34
Example – 3: Draw the simplest possible logic diagram that
Implements the output of the logic diagram shown below
35
NAND Gate as Universal Gate:
36
NAND Gate as Universal Gate:
37
NOR Gate as Universal Gate:
38
NOR Gate as Universal Gate:
39
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)’)
42
Converting AND-OR-INVERT logic to NAND/NOR logic:
Convert the following AOI logic circuit to (a) NAND logic (b) NOR logic
43
44
45
MINTERM AND MAXTERM:
46
MINTERM AND MAXTERM:
Example – 1:
47
MINTERM AND MAXTERM:
Example – 2:
48
Canonical SOP / SSOP:
Canonical SoP form means Canonical Sum of Products form or Standard Sum of Products form.
In this form, each product term contains all literals. So, these product terms are nothing but the
min terms. Hence, canonical SoP form is also called as sum of min terms form.
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 {(m 0, m1), (m2, m3), (m0,
m2) and (m1, m3)}.
51
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 {(m 0, 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.
52
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.
53
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.
54
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.
55
K-Map:
Example – 2: Reduce the expression (A + B)(A + B’)(A’ + B’) using mapping.
56
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.
57
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.
58
K-Map:
Example – 5: Obtain the real minimal expression for ∑ m (1,2,4,6,7) and implement it using universal gates.
59
K-Map:
Example – 6: Reduce using mapping the expression ∑ m (0-3,5,7-10,12,13) and implement it in
universal logic.
60
K-Map:
Example – 7: Reduce the following expression using mapping ∑ m (0,2,3,10-13,16-21,26,27).
61
K-Map: Example – 7: Reduce the following expression using mapping ∑ m (0,2,3,10-13,16-21,26,27).
62
K-Map:
Example – 8: Reduce the following expression using mapping ∑ m (1,3,6,7).
63
K-Map:
Example – 9: Reduce the following expression using mapping ∏ M (0,3,6,7).
64
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
Isolated zero
Don’t care combinations:
The “Don’t Care” conditions allow to replace the empty cell of a K-Map to form a grouping of
the variables. While forming groups of cells, a “Don’t Care” cell may be considered as either 1
or 0 or simply ignored. Therefore, “Don’t Care” condition helps to form a larger group of cells.
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 67
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)
71
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.
• The minterms which are not covered by the EPIs are taken into consideration and a minimum cover is 72
obtained form the remaining PIs.
TABULAR METHOD
Simplify the given function using tabular method.F (A, B, C, D) = ∑ m (0,1,6,7, 8,9,13,14,15)
73
TABULAR METHOD
Simplify the given function using tabular method.F (A, B, C, D) = ∑ m (0,1,6,7, 8,9,13,14,15)
Prime Implicant Chart
PIs/Minterms ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔
0 1 6 7 8 9 13 14 15
*P 6,7,14,15 (1,8) X X X X
*Q 0,1,8,9 (1,8) X X X X
R 13,15(2) X X
S 9,13(4) X X
75
TABULAR METHOD
Simplify the given function using tabular method.F (A, B, C, D) = ∑ m (0, 2, 3, 6, 7, 8, 10, 12, 13)
76
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
77
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)
78
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
79
Refernces
“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-bool
ean-algebra/
https://www.geeksforgeeks.org/dont-care-x-conditions-in-k-maps/
“Fundamentals of Digital Circuits” by A.Anand Kumar
80
A N K
T H
Y O U
81