Professional Documents
Culture Documents
INS3179 Digital Design Lecture 3n4 Boolean and Switching Algebra
INS3179 Digital Design Lecture 3n4 Boolean and Switching Algebra
ĐẠI HỌC
CÔNG NGHỆ University of Engineering and Technology
Xuan-Tu Tran
Faculty of Electronics and Telecommunications (FET)
VNU Key Laboratory for Smart Integrated Systems (SISLAB)
ĐẠI HỌC
CÔNG NGHỆ
History
1
ĐẠI HỌC
CÔNG NGHỆ
The Huntington postulates
(*) The terms binary operator and unary operator refer to the number of arguments involved
in the operation: two or one, respectively.
ĐẠI HỌC
CÔNG NGHỆ
The Huntington postulates
⚫ a+bB
⚫ a·bB
2
ĐẠI HỌC
CÔNG NGHỆ
The Huntington postulates
ĐẠI HỌC
CÔNG NGHỆ
The Huntington postulates
a + a =1
aa = 0
3
ĐẠI HỌC
CÔNG NGHỆ
Switching Algebra
⚫ The two binary operators, represented by the signs + and ·, are called the OR
and the AND, respectively.
⚫ The unary operator, represented by the overbar ¯, is called the NOT or the
complement operator.
ĐẠI HỌC
CÔNG NGHỆ
Algebra Implications
a + a = (a + a ) 1 P-2(ii) a a= a a + 0 P-2(i)
=a P-2(i) =a P-2(ii)
4
ĐẠI HỌC
CÔNG NGHỆ
Algebra Implications
Theorem 2
a0 = 0a = 0
⚫
(i)
(ii) a +1 = 1+ a = 1
Proof
= aa + a 0 P-5(ii)
Principle
P-5(i)
of duality
= a (a + 0) P-4(i) P-4(ii)
= a (a ) P-2(i) P-2(ii)
=0 P-5(ii) P-5(i)
ĐẠI HỌC
CÔNG NGHỆ
Algebra Implications
⚫ Theorem 3
Let a be an element of B. Then a-bar is unique.
Proof
5
ĐẠI HỌC
CÔNG NGHỆ
Algebra Implications – Basic logic operations
⚫ From this point, we will restrict our attention to switching algebras only.
⚫ Switching algebra is basically a two-element Boolean algebra which, obviously,
has the two elements 0 and 1.
⚫ AND operation
Symbols
x y z=x·y
x
0 0 0 Theorem 1(ii) z
y
0 1 0 Theorem 2(i)
1 0 0 Postulate 3(ii) x
z
1 1 1 Theorem 1(ii) y
ĐẠI HỌC
CÔNG NGHỆ
Algebra Implications – Basic logic operations
Symbols
⚫ OR operation
x
x y z=x+y z
y
0 0 0 Derived from which
0 1 1 theorem, postulate?
x
1 0 1 Exercise for Students z
y 1
1 1 1
6
ĐẠI HỌC
CÔNG NGHỆ
Algebra Implications – Basic logic operations
⚫ NAND operation
Symbols
x y z=x·y
x
0 0 1 z
y
0 1 1
1 0 1 x
z
y
1 1 0
⚫ NOR operation
Symbols
x y z=x+y
x
0 0 1 z
y
0 1 0
1 0 0 x
z
y 1
1 1 0
3/29/2023 Xuan-Tu Tran 13
ĐẠI HỌC
CÔNG NGHỆ
Algebra Implications – Basic logic operations
⚫ XOR operation
Symbols
x y z=xy
x
0 0 0 z
y
0 1 1
1 0 1 x
z
y =1
1 1 0
z = x y = xy + x y
7
ĐẠI HỌC
CÔNG NGHỆ
Algebra Implications – Basic logic operations
⚫ NXOR operation
Symbols
x y z=xy
x
0 0 1 z
y
0 1 0
1 0 0 x
z
y =1
1 1 1
z = x y = x. y + x. y
- Construct NXOR gate from NOT, AND, and OR ?
ĐẠI HỌC
CÔNG NGHỆ
Algebra Implications
⚫ Theorem 4 – Involution
Định lý phủ định của phủ định
8
ĐẠI HỌC
CÔNG NGHỆ
Algebra Implications
⚫ Theorem 5
Let x and y be two switching variables. Then (i) x + x y = x
(ii) x (x + y ) = x
Proof
x y x y x + x y
0 0 0 0 + 0 0
0 1 0 0 + 0 0
1 0 0 1 + 0 1
1 1 1 1 + 1 1
ĐẠI HỌC
CÔNG NGHỆ
Algebra Implications
⚫ Theorem 6
Let x, y, and z be switching variables. Then
9
ĐẠI HỌC
CÔNG NGHỆ
Algebra Implications – De Morgan’s Theorem
⚫ De Morgan’s Theorem
Let x and y be two switching variables. Then
(x + y ) = x y
(x y ) = x + y
Proof
ĐẠI HỌC
CÔNG NGHỆ
Algebra Implications – De Morgan’s Theorem
10
ĐẠI HỌC
CÔNG NGHỆ
Algebra Implications – De Morgan’s Theorem
(x1 + x2 + + xn ) = x1 x2 xn
(x1 x2 xn ) = x1 + x2 + + xn
Expand the following function:
((x ( y + z )) ( y + w z ) (x + z ))
ĐẠI HỌC
CÔNG NGHỆ
Truth tables
⚫ Truth table
11
ĐẠI HỌC
CÔNG NGHỆ
Truth tables
F ( x, y, z ) = x + yz
x y z F (x, y, z)
0 0 0 1
0 0 1 1
0 1 0 1
0 1 1 1
2n assignment 1 0 0 0
possibilities 1 0 1 0
1 1 0 1
1 1 1 0
- Write the Truth Table for the following switching function: F (x, y, z) = x y z + x y
3/29/2023 Xuan-Tu Tran 23
ĐẠI HỌC
CÔNG NGHỆ
Truth tables
x y F (x, y)
0 0 0 F (x, y) ???
0 1 0
1 0 0
1 1 1
12
ĐẠI HỌC
CÔNG NGHỆ
Canonical forms: Minterm - Maxterm
⚫ F = 1 whenever x = 1 and y = 1
x y F (x, y)
0 0 0
F ( x, y ) = xy 0 1 0
1 0 0
1 1 1
ĐẠI HỌC
CÔNG NGHỆ
Canonical forms: Minterm - Maxterm
F ( x, y, z ) = x yz + x yz + xyz
3/29/2023 Xuan-Tu Tran 26
13
ĐẠI HỌC
CÔNG NGHỆ
Canonical forms: Minterm - Maxterm
ĐẠI HỌC
CÔNG NGHỆ
Canonical forms: Minterm - Maxterm
14
ĐẠI HỌC
CÔNG NGHỆ
Canonical forms: Minterm - Maxterm
F ( A, B, C ) = A B + AC
= A B 1 + A 1 C = A B + AC
= A B (C + C ) + A( B + B )C = ( A B + A)( A B + C )
= A BC + A BC + ABC + AB C = ( A + A )( A + B )(C + A )(C + B )
= 1 ( A + B )( A + C )( B + C )
= ( A + B )( A + C )( B + C )
= ( A + B )( A + C ) [concensus]
A+ B = A+ B +0
= A + B + CC
= ( A + B + C )( A + B + C ) P - 4(ii)
F ( A, B, C ) = ( A + B + C )( A + B + C )( A + B + C )( A + B + C )
15
Conversion of SOP and POS expressions to canonical
forms
ĐẠI HỌC
CÔNG NGHỆ
Variable
Minterm (m) Maxterm (M)
A B C
A B C A B C =m0 A + B + C = M7
A B C A B C =m1 A + B + C = M6
A B C A B C =m2 A + B + C = M5
A B C A B C =m3 A + B + C = M4
A B C A B C =m4 A + B + C = M3
A B C A B C =m5 A + B + C = M2
A B C A B C =m6 A + B + C = M1
A B C A B C =m7 A + B + C = M0
F ( A, B, C ) = A B + AC
= A B 1 + A 1 C
= A B (C + C ) + A( B + B )C
= m(3, 2, 7, 5)
= A BC + A BC + ABC + AB C = M (0, 1, 4, 6)
F ( A, B, C ) = ( A + B + C )( A + B + C )( A + B + C )( A + B + C )
16
ĐẠI HỌC
CÔNG NGHỆ
Example
ĐẠI HỌC
CÔNG NGHỆ
17
ĐẠI HỌC
CÔNG NGHỆ
Simplification of Switching Functions
ĐẠI HỌC
CÔNG NGHỆ
Simplification of Switching Functions
⚫ Algebraic Manipulation
⚫ All theorems and postulates are used to find the minimal form
18
ĐẠI HỌC
CÔNG NGHỆ
Simplification of Switching Functions
f ( w, x, y, z ) = w x z + w xz + xyz + wxy
= ( x ( w z ) + x( w z ) ) + xyz + wxy
= w z + w( xy ) + z ( xy )
= w z + wxy
Result 1 : xy + x y = y
Result 2 : x + x y = x + y
Result 3 : x z + xy + yz = x z + xy
ĐẠI HỌC
CÔNG NGHỆ
Simplification of Switching Functions
19
ĐẠI HỌC
CÔNG NGHỆ
Simplification of Switching Functions
None of the listed results can be applied for the above expression.
It’s OK or NOT yet ?
Attention: z + z =1
➔ The above expression should equal 1
3/29/2023 Xuan-Tu Tran 39
ĐẠI HỌC
CÔNG NGHỆ
Simplification of Switching Functions
⚫ Prime implicants
⚫ An implicant is a "covering" (sum term or product term) of one or more minterms in a sum of
products (or maxterms in a product of sums) of a boolean function.
⚫ In an SOP expression, each of the product terms ➔ an implicant of the function if it implies the
function (e.g., if the product term is 1 then the function is also 1).
20
ĐẠI HỌC
CÔNG NGHỆ
Simplification of Switching Functions
⚫ Prime implicants
h( w, x, y, z ) = w x yz + w xyz + wx yz + wxyz
➔ Each of the minterm is an implicant.
= yz ➔ is also an implicant.
literals
ĐẠI HỌC
CÔNG NGHỆ
Simplification of Switching Functions
⚫ Minimal expression
⚫ Any other expression having fewer terms and literals will not represent the original function.
21
ĐẠI HỌC
CÔNG NGHỆ
Simplification of Switching Functions
⚫ Karnaugh map
⚫ M. Karnaugh published an article describing a geometrical method for finding a
minimal closed cover (1953) ➔ Karnaugh map method
⚫ Based on mapping minterms onto a surface in such a way that minterms that differ
in one literal are adjacent to each other on the surface.
⚫ Reason: when 2 minterms differ in one literal, they can be combined to form a
product term which has this literal missing.
⚫ For example, ĀBC and ABC differ in only one literal (Ā and A) → the sum reduces
to A BC + ABC = BC
ĐẠI HỌC
CÔNG NGHỆ
Simplification of Switching Functions
⚫ Karnaugh map
All minterms in the column labeled B contain the literalA B B
⚫ AB
B, all those in the other column contain B-bar. Similar
for the rows 1 0
= AB + A B
⚫ For example, the pair of cells and group
together to give AB AB = B ( A + A)
B =B
3/29/2023 Xuan-Tu Tran 44
22
ĐẠI HỌC
CÔNG NGHỆ
Simplification of Switching Functions
⚫ Karnaugh map
1-cube: a single square B
⚫
B
⚫ 2-cube: two adjacent squares are taken together
1 0
⚫ 4-cube: two adjacent 2-cubes or two 2-cubes have a
long edge in common.
A 1 1
The largest cube of 1s represent the prime implicants.
⚫
A
⚫ In the figure, the prime implicants are A and B
therefore: f ( A, B )
f ( A, B) = A + B
ĐẠI HỌC
CÔNG NGHỆ
Simplification of Switching Functions
x yz x yz y
x yz
x yz
0 1 1 1
x 1 1 1 1
xyz
xyz z xyz
xyz
3/29/2023 Xuan-Tu Tran 46
23
ĐẠI HỌC
CÔNG NGHỆ
Simplification of Switching Functions
y wy
⚫ Karnaugh map for 4 variables
⚫ Two 3-variable Karnaugh map are
placed side by side after reflecting one
of the two 3-variable maps → get a 4-
variable map w
z y
ĐẠI HỌC
CÔNG NGHỆ
Simplification of Switching Functions
⚫ Timing Hazards
24
ĐẠI HỌC
CÔNG NGHỆ
Delay in gate networks (cont’d)
ĐẠI HỌC
CÔNG NGHỆ
Delay in gate networks (cont’d)
25
ĐẠI HỌC
CÔNG NGHỆ
ĐẠI HỌC
CÔNG NGHỆ
AB
CD
1 1
z
1 1
1 1
26
ĐẠI HỌC
CÔNG NGHỆ
AB A
CD
1 1
D
z
1 1
C
1 1
B
3/29/2023 Xuan-Tu Tran 53
27