Logic Gates and Truth Tables Implementing Logic Functions Canonical Forms
Logic Gates and Truth Tables Implementing Logic Functions Canonical Forms
Logic Gates and Truth Tables Implementing Logic Functions Canonical Forms
Logic gates and truth tables Implementing logic functions Canonical forms
Sum-of-products Product-of-sums
AND
XY
X Y
XY
Z
X 0 0 1 1 X 0 0 1 1 X 0 1
Y 0 1 0 1 Y 0 1 0 1 Y 1 0
Z 0 0 0 1 Z 0 1 1 1
OR
X+Y
X Y Z
NOT
X'
X
_ X
Y
NAND
X Y
XY
XY
Z
X 0 0 1 1
Y 0 1 0 1
Z 1 1 1 0
NOR
X Y
XY
Z
X 0 0 1 1
Y 0 1 0 1
Z 1 0 0 0
XOR
XY
X Y Z
X 0 0 1 1
Y 0 1 0 1
Z 0 1 1 0
XNOR
X Y
XY
Z
X 0 0 1 1
Y 0 1 0 1
Z 1 0 0 1
A B C D F
F = (AB) + CD
F = C(A+B)
A B C F
Example
A B 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1 C 0 1 0 1 0 1 0 1 F 0 0 1 1 0 1 0 1
A B Cin
Adder
Sum Cout
A 0 0 0 0 1 1 1 1
B 0 0 1 1 0 0 1 1
Sum = A'B'Cin + A'BCin' + AB'Cin' + ABCin Cout = A'BCin + AB'Cin + ABCin' + ABCin Both Sum and Cout can be minimized.
10
Cin
Cout
Sum1 Sum2
Overflow Sum
11
12
We use the axioms and theorems of Boolean algebra to optimize our designs Design goals vary
Reduce the number of gates? Reduce the number of gate inputs? Reduce the number of cascaded levels of gates?
13
Logic minimization: Reduce number of gates and complexity Logic optimization: Maximize speed and/or minimize power CAD tools
14
Canonical forms
Canonical forms
Standard forms for Boolean expressions Derived from truth table Generally not the simplest forms (can be minimized)
Sum-of-products (SOP)
A 0 0 0 0 1 1 1 1
B 0 0 1 1 0 0 1 1
C 0 1 0 1 0 1 0 1
F 0 1 0 1 0 1 1 1
F' 1 0 1 0 1 0 0 0
Minterms
Variables appear exactly once in each minterm in true or inverted form (but not both)
C 0 1 0 1 0 1 0 1 minterms A'B'C' m0 A'B'C m1 A'BC' m2 A'BC m3 AB'C' m4 AB'C m5 ABC' m6 ABC m7 F in canonical form: F(A,B,C) = m(1,3,5,6,7) = m1 + m3 + m5 + m6 + m7 = A'B'C+A'BC+AB'C+ABC'+ABC
A 0 0 0 0 1 1 1 1
B 0 0 1 1 0 0 1 1
short-hand notation
17
Product-of-sums (POS)
A 0 0 0 0 1 1 1 1
B 0 0 1 1 0 0 1 1
C 0 1 0 1 0 1 0 1
F 0 1 0 1 0 1 1 1
F' 1 0 1 0 1 0 0 0
F = (A + B + C) (A + B' + C) (A' + B + C)
maxterm
F' = (A+B+C')(A+B'+C')(A'+B+C')(A'+B'+C)(A'+B'+C') 18
Maxterms
Variables appear exactly once in each maxterm in true or inverted form (but not both)
C 0 1 0 1 0 1 0 1 maxterms A+B+C M0 A+B+C' M1 A+B'+C M2 A+B'+C' M3 A'+B+C M4 A'+B+C' M5 A'+B'+C M6 A'+B'+C' M7 F in canonical form: F(A,B,C) = M(0,2,4) = M0 M2 M4 = (A+B+C)(A+B'+C)(A'+B+C)
A 0 0 0 0 1 1 1 1
B 0 0 1 1 0 0 1 1
short-hand notation
19
Example: F = AB+C
20
Minterm to maxterm
Use maxterms that arent in minterm expansion F(A,B,C) = m(1,3,5,6,7) = M(0,2,4) Use minterms that arent in maxterm expansion F(A,B,C) = M(0,2,4) = m(1,3,5,6,7)
21
Maxterm to minterm
Use minterms that dont appear F(A,B,C) = m(1,3,5,6,7) F' = m(0,2,4) Use maxterms that dont appear F(A,B,C) = M(0,2,4) F' = M(1,3,5,6,7)
22
Sum-of-products
23
Product-of-sums
F' = (A+B+C')(A+B'+C')(A'+B+C')(A'+B'+C')
24