Beruflich Dokumente
Kultur Dokumente
2018 2018
Introduction
• Basic logic gate functions will be combined in
combinational logic circuits.
• Simplification of logic circuits will be done using
Boolean algebra and a mapping technique.
• Troubleshooting of combinational circuits will be
introduced.
BK
TP.HCM
Chapter 3:
Combinational Circuits
dce dce
2018
Sum-of-Products & Product-of-sums Forms
2018
• A Product-of-sums(POS) expression is
sometimes used in logic design.
• We will study simplifying logic circuits using
Boolean algebra and Karnaugh mapping
( A B C )( A B C )
3 4
1
Digital Systems, Chapter 3
dce dce
2018
• Note that this process may involve some – Combine the terms in SOP form.
trial and error to obtain the simplest result. – Simplify the output expression if possible.
5 6
dce dce
2018
Example of Logic Design 2018
Example of Logic Design
• Design a logic circuit that has three inputs, A B C X (Consensus)
(a) ab + a'c + bc = ab + a'c
A, B, and C, whose output will be HIGH only 0 0 0 0 (b) (a + b)(a' + c)(b + c) = (a + b)(a' + c)
when a majority of the inputs are HIGH. 0 0 1 0
0 1 0 0 Examples:
X = A’BC + AB’C + ABC’ + ABC AB + A'CD + BCD = AB + A'CD
0 1 1 1
(a + b')(a' + c)(b' + c) = (a + b')(a' + c)
X = A’BC + ABC + AB’C + ABC + ABC’ + ABC 1 0 0 0
1 0 1 1 ABC + A'D + B'D + CD = ABC + (A' + B')D + CD
X = BC (A’+ A) + AC(B’+ B) + AB(C’ + C) 1 1 0 1
1 1 1 1 = ABC + (AB)'D + CD
X = BC + AC + AB
= ABC + (AB)'D
7 8
2
Digital Systems, Chapter 3
dce dce
2018
9 10
dce dce
2018
11 12
3
Digital Systems, Chapter 3
dce dce
2018
Minimization Technique
• Looping adjacent groups of 2, 4, or 8 1s will result in • Minimization is done by spotting patterns of 1's and 0's
further simplification. • Simple theorems are then used to simplify the Boolean
description of the patterns
• Pairs of adjacent 1's
– remember that adjacent squares differ by only one variable
– hence the combination of 2 adjacent squares has the form
– P ( A + A’ )
– this can be simplified (from before) to just P
13 14
dce
2018
dce
2018
15 16
4
Digital Systems, Chapter 3
dce dce
2018
17 18
dce dce
2018
Example 2018
Example
19 20
5
Digital Systems, Chapter 3
dce dce
2018
Example 2018
Example
• Use a K map to simplify: • Use a K map to simplify:
Y = C’(A’B’D’ + D) + AB’C + D’
21 22
dce dce
2018
Don’t Care Conditions 2018
Example
• In certain cases some of the minterms may never occur
or it may not matter what happens if they do • Use a K map to simplify:
– In such cases we fill in the Karnaugh map with X
𝐶𝐷 𝐶𝐷 𝐶𝐷 𝐶𝐷
• meaning don't care 𝐶𝐷 𝐶𝐷 𝐶𝐷 𝐶𝐷
– When minimizing an X is like a "joker" 𝐴𝐵 1 0 1 1
𝐴𝐵 1 1 1 1
• X can be 0 or 1 - whatever helps best with the minimization 𝐴𝐵 1 0 0 1
• “Don’t care” conditions should be changed to either 0 or a. 𝐴𝐵 1 1 0 0
b. 𝐴𝐵 0 0 0 0
𝐴𝐵 0 0 0 1
1 to produce K-map looping that yields the simplest 𝐴𝐵 1 0 1 1
𝐴𝐵 0 0 1 1
expression.
𝐶 𝐶
𝐶𝐷 𝐶𝐷 𝐶𝐷 𝐶𝐷
𝐴𝐵 1 1
𝐴𝐵 0 1 X 0
𝐴𝐵 0 0 𝐴𝐵 1 1 0 X
c. 𝐴𝐵 1 0 d. 𝐴𝐵 X 0 1 1
𝐴𝐵 1 x 𝐴𝐵 0 X 1 0
23
6
Digital Systems, Chapter 3
dce dce
2018
Terminology: Minterms 2018
Terminology: Sum of minterms form
• A minterm is a special product of literals, in which each input • Every function can be written as a sum of minterms, which is a
variable appears exactly once. special kind of sum of products form
• A function with n variables has 2n minterms (since each variable can • The sum of minterms form for any function is unique
appear complemented or not)
• If you have a truth table for a function, you can write a sum of
• A three-variable function, such as f(x,y,z), has 23 = 8 minterms: minterms expression just by picking out the rows of the table where
x’y’z’ x’y’z x’yz’ x’yz the function output is 1.
xy’z’ xy’z xyz’ xyz
f = x’y’z’ + x’y’z + x’yz’ + x’yz + xyz’
• Each minterm is true for exactly one combination of inputs: x y z f(x,y,z) f’(x,y,z) = m0 + m1 + m2 + m3 + m6
0 0 0 1 0 = m(0,1,2,3,6)
Minterm Is true when… Shorthand 0 0 1 1 0
x’y’z’ x=0, y=0, z=0 m0 0 1 0 1 0 f’ = xy’z’ + xy’z + xyz
x’y’z x=0, y=0, z=1 m1 0 1 1 1 0 = m4 + m5 + m7
x’yz’ x=0, y=1, z=0 m2 = m(4,5,7)
1 0 0 0 1
x’yz x=0, y=1, z=1 m3
1 0 1 0 1
xy’z’ x=1, y=0, z=0 m4 f’ contains all the minterms not in f
1 1 0 1 0
xy’z x=1, y=0, z=1 m5
1 1 1 0 1
xyz’ x=1, y=1, z=0 m6
xyz x=1, y=1, z=1 m7
25 26
dce dce
2018
Minterms and Maxterms & Binary representations 2018
SOP-POS Conversion
A B C Min- Max- • Minterm values present in SOP expression not
terms terms present in corresponding POS expression
0 0 0 A .B.C A BC • Maxterm values present in POS expression not
0 0 1 A .B.C A BC present in corresponding SOP expression
0 1 0 A .B.C A BC • Relationship between minterm mi and maxterm
0 1 1 A .B.C A BC Mi:
1 0 0 A .B.C A BC – For f(A,B,C), (m1)' = (A'B'C)' = A + B + C' = M1
1 0 1 A .B.C A BC – In general, (mi)' = Mi
A BC
(Mi)' = ((mi)')' = mi
1 1 0 A .B.C
1 1 1 A.B.C A BC
27 28
7
Digital Systems, Chapter 3
dce dce
2018
SOP-POS Conversion 2018
Boolean Expressions and Truth Tables
( A B C)( A B C)( A B C)
• A ,B ,C (0,2,3,5,7 ) = A ,B ,C (1,4,6)
29 30
dce dce
2018
SOP-Truth Table Conversion 2018
POS-Truth Table Conversion
A B BC ( A B )(B C ) A ,B ,C (1,2,3,5)
A ,B ,C (3,4,5,7 ) ABC A BC A BC ABC ( A B C)( A B C)( A B C)( A B C)
Input Output
Input Output
A B C F
A B C F
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 0
0 1 0 0
0 1 0 0
0 1 1 1
0 1 1 0
1 0 0 1
1 0 0 1
1 0 1 1
1 0 1 0
1 1 0 0
1 1 0 1
1 1 1 1
1 1 1 1
8
Digital Systems, Chapter 3
dce dce
2018
Example 2018
Simplification of POS expressions using K-map
33
dce
2018
dce
2018
Simplification of POS expressions using K-map Simplification of POS expressions using K-map
10 0 1 ( A B ).( A B C) 11 1 0 1 1
10 1 0 1 0
9
Digital Systems, Chapter 3
dce dce
2018
Example 2018
Example
• Let’s design a logic circuit that controls an elevator door
in a three-story building.
– The circuit has four inputs.
– M is a logic signal that indicates when the elevator is moving (M=
1) or stopped (M = 0).
– F1,F2, and F3 are floor indicator signals that are normally LOW,
and they go HIGH only when the elevator is positioned at the
level of that particular floor.
– For example, when the elevator is lined up level with the second
floor, F2 = 1 and F1 = F3 = 0. The circuit output is the OPEN
signal, which is normally LOW and will go HIGH when the
elevator door is to be opened.
37 38
dce dce
2018
K Map Method Summary 2018
Summary
• Compared to the algebraic method, the K-map process • SOP and POS –useful forms of Boolean equations
is a more orderly process requiring fewer steps and • Design of a comb. Logic circuit
always producing a minimum expression. – (1) construct its truth table, (2) convert it to a SOP, (3)
• The minimum expression in generally is NOT unique. simplify using Boolean algebra or K mapping, (4)
• For the circuits with large numbers of inputs (larger than implement
four), other more complex techniques are used. • K map: a graphical method for representing a
circuit’s truth table and generating a simplified
expression
• “Don’t cares” entries in K map can take on values of
1 or 0. Therefore can be exploited to help
simplification
39 40
10
Digital Systems, Chapter 3
dce dce
2018
Example: 2-input NAND gates 2018
Example 2
• Implement The following function using only two-input • The following function is in minimum sum of products
NAND gates. form. Implement it using only two-input NAND gates.
• B = x'y'b + x'yb' + x'yb + xyb No gate may be used as a NOT gate.
= x'(y'b + yb') + yb(x'+x) by distributivity • f = w' y' z + x y' + w y z + x' y z'
= x'(y'b + yb') + yb by complement • = y' (w' z + x) + y (w z + x' z')
= x'((y'b)' (yb')')' + yb by De Morgan's law
w'
= ((x' ((y'b)' (yb')')')' (yb)' )' by De Morgan's law z
x'
y'
w f
z
y
x'
z'
41 42
dce dce
2018
Exclusive-OR 2018
Exclusive-NOR
• The exclusive OR (XOR) produces a HIGH output • The exclusive NOR (XNOR) produces a HIGH output
whenever the two inputs are at opposite levels. whenever the two inputs are at the same level.
• XOR and XNOR outputs are opposite.
43 44
11
Digital Systems, Chapter 3
dce dce
2018
Enable/Disable Circuits
• XOR and XNOR gates are useful in circuits for
parity generation and checking. • A circuit is enabled when it allows the
passage of an input signal to the output.
• A circuit is disabled when it prevents the
passage of an input signal to the output.
• Situations requiring enable/disable
circuits occur frequently in digital circuit
design.
45 46
dce dce
2018
Enable/Disable Circuits
• Design a logic circuit that will allow a signal to pass
to the output only when control inputs B and C are
• AND gate function act as enable/disable circuits both HIGH; otherwise, the output will stay LOW.
47 48
12
Digital Systems, Chapter 3
dce dce
2018
49 50
dce
2018
dce
2018
51 52
13
Digital Systems, Chapter 3
dce
2018
dce
2018
53 54
dce
2018
dce
2018
55 56
14
Digital Systems, Chapter 3
dce
2018
dce
2018
57 58
dce dce
2018
59 60
15
Digital Systems, Chapter 3
dce
2018
dce
2018
61 62
dce
2018
dce
2018
63 64
16
Digital Systems, Chapter 3