Chapter 2 Part 1 Logic Gates and Boolean Algebra
Chapter 2 Part 1 Logic Gates and Boolean Algebra
Logic Gates
Inverter AND Gate OR Gate Exclusive-OR Gate NAND Gate NOR Gate Exclusive-NOR Gate
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
Truth table
0 = LOW 1 = HIGH
Pulsed waveforms
The output of an AND gate is HIGH only when all inputs are HIGH.
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
Pulsed waveforms
The output of an OR gate is HIGH whenever one or more inputs are HIGH
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
Pulsed waveforms
The output of a NAND gate is HIGH whenever one or more inputs are LOW.
Pulsed waveforms
The output of a NOR gate is LOW whenever one or more inputs are HIGH.
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
Pulsed waveforms
The output of an XOR gate is HIGH whenever the two inputs are different.
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
Pulsed waveforms
The output of an XNOR gate is HIGH whenever the two inputs are identical.
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
CHAPTER 2 LECTURE 5
Logic Gates and Boolean Algebra
Multiplication
0*0=0 0*1=0 1*0=0 1*1 =1
Commutative Laws Associative Laws Distributive Law 12 basic rules of Boolean Algebra
Commutative Laws: A+B = B+A AB = BA Associative Laws: A+(B+C) = (A+B)+C A(BC) = (AB)C Boolean Addition: * A+0 = A * A+1 = 1 * A+A = A * A+ = 1 Complement Rules: * Distributive Laws: A(B+C) = AB+AC Demorgans Theorem:
XY X Y X Y XY
Boolean Multiplication: * A0 = 0 * A1 = A * AA = A * A = 0 Boolean other Rules: * A+AB = A * A+B = A+B +AB = +B * (A+B)(A+C) = A+BC
AA
17
OR Truth Table
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
OR Truth Table
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
OR Truth Table
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
OR Truth Table
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
A AB A B
XY X Y
Theorem 2
X Y XY
Remember: Break the bar, change the sign
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
CHAPTER 2 LECTURE 6
Logic Expression and Minimization
Logic Gates
Name Graphical Symbol Algebraic Function Truth Table AND
x 0 0 1 1 x 0 0 1 1 y 0 1 0 1 y 0 1 0 1 x f 0 0 0 1 f 0 1 1 1 f 1 0
x y
f xy
OR
x y f
f x y
INVERTER
f x
0 1
38
Logic Gates
Name NAND Graphical Symbol Algebraic Function Truth Table
x 0 0 1 1 y f 1 1 1 0 f 1 0 0 0 f 0 1 1 0 f 1 0 0 1
x y
f xy
NOR
x y f
f x y f xy x y
f x y
0 1 0 1 x y 0 0 0 1 1 0 1 1 x 0 0 1 1 y
EX-OR
x y
EX-NOR
x y
f xy x y f x y
0 1 0 1 x y 0 0 0 1 1 0 1 1
39
Boolean Expression
Boolean expressions are a much better form for representing digital circuits because it is much easier to manipulate and simplify. A Boolean expression is an expression formed with: binary variables the binary operators OR and AND the operator NOT parentheses an equal sign For example, F xy z ; F is 1 when z = 1 OR when x = 0 AND y = 1. The precedence of operations is as follows: parentheses, NOT, AND OR.
40
Boolean Algebra
Definition: Theorems that are used at design time to manipulate and simplify Boolean expressions for easier and less expensive implementation. Any Boolean expression can be represented using only AND, OR, and NOT operations. May need to use Boolean algebra to change the form of a Boolean expression to better utilize the types of gates provided by the component library being used. A Boolean variable, x, can have two values, typically 1 and 0 (on and off)
41
Ex:
A B AB+CD C D CD AB
42
Y ( A B )(C D )
Ex:
A B
W AB A C
W
C
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
43
44
x ( A B )( B C )
45
46
47
DeMorgans Theorem
WXYZ
W X Y Z
A B CD
AB CD EF
48
Y AB AB C BB C
F X Y X Y X Z
49
ABC BD ABC
ABC ABC ABC ABC ABC
AB AC ABC
F XY X Z YZ
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
Standardization makes the evaluation, simplification and implementation of Boolean expressions much more systematic and easier.
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
50
52
Sum-of-products (SOP)
Converting product terms to standard SOP
Step 1: multiply each nonstandard product term by a term made up of the sum of a missing variable and its complement. Eg: multiply ( A A) Repeat step 1 until all resulting product terms contain all variables. Ex: Convert following Boolean expression into standard SOP form: ABC AB ABC D
53
54
55
Product-of-Sums (POS)
Converting a sum term to Standard POS
Add to each nonstandard product term a term made up of the product of the missing variable and its complement. Example: add ( A A) and apply rule 12. Repeat step 1 until all sum terms contain all variables. Ex: Convert the following Boolean expression into standard POS form: A B C B C D A B C D
56
57
58
59
B 0 0 1 1 0 0 1 1
C 0 1 0 1 0 1 0 1
Y 0 1 0 1 0 1 0 0
ABC ABC A BC
60
B 0 0 1 1 0 0 1 1
C 0 1 0 1 0 1 0 1
Y 1 1 0 1 0 1 1 0
A B C
A B C A B C
Ex: Develop the truth table for and draw logic circuit.
61
y c ab abc
6 literals in 3 terms
maxterm
y (b c ) ( a b ) ( a b c )
7 literals in 3 terms
62
0 1 2 3 4 5 6 7
63
64
65
66
67
68
69
2 variables K-map
A two variable K-map with their truth table which is showing product terms of each line as shown below
A B Product term
0 0 1 1
0 1 0 1
AB
AB AB
AB
AB
AB
AB
AB
variables.
70
AB AB AB
Kompetensi Teras Kegemilangan
2 variables K-map
71
3 Variable K-map
A B C Product terms
C
ABC
ABC ABC
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
A BC
AB
AB
AB
A BC
ABC
A BC
ABC
ABC ABC
A BC
AB
ABC
ABC
Ex: Map the SOP expression ABC ABC ABC ABC ABC of three variables.
72
3 Variable K-map
73
3 Variable K-map
3 Variable K-map
3-Variable Example
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
4 Variable K-map
76
4 Variable K-map
4 Variable K-map
4-Variable Example
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
4 Variable K-map
Ex: Map the following four variable SOP expressions:
79
5 Variable K-map
More examples
81
More examples
82
More examples
83
More examples
84
More examples
85
More examples
Use a K-map to simplify the following Boolean function:
F(A,B,C) = m(0,2,3,7)
BC A 00 0
00
0
01
1
11
3
10
2
AB
AC
01 1
1
4 5
1
7
1
6
BC
86
More examples
Use a K-map to simplify the following Boolean function:
F(A,B,C,D) = M(0,1,2,4,9,11,15) F(A,B,C,D) = m(3,5,6,7,8,10,12,13,14)
CD AB 00 01 11 10 1
8
00
0
01
1
11
3
10
2
CD AB 00 01 11 10
00
0
01
1
11
3
10
2
CD AB 00 01 11 10
00
0
01
1
11
3
10
2
1
4 5 7 6 4 5
1
7 6 4 5
1
7 6
1
12 13
1
15
1
14 12
1
13
1
15
1
14 12
1
13
1
15
1
14
1
9 11
1
10
1
8
1
9 11
1
10
1
8
1
9 11
1
10
Prime Implicants
Final Expression
87
88
89
90
91
1)
A B C A B C A B C A B C A B C
2)
A B C D A B C D A B C DA B C D A B C D
92
Example:
1)
C D CD
AB AB
AB
0 0 0 0 0 1 1 0
CD C D
0 1 1 1 1 0 0 0
2)
CD
AB AB
AB
C D CD
1 1 0 1 0 1 0 0
CD
0 1 1 1
0 0 0 1
AB
AB
93
Example:
3) 4)
C D CD CD C D
AB AB
C D CD CD C D
AB AB
0 1 x 0
1 0 x 1
1 0 x x
1 0 x x
1 1 x 1
0 0 x 0
1 1 x x
0 0 x x
AB
AB
AB
AB
94
QUIZ 2 (Chapter 2)
A B C X
0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1
0 0 1 1 1 0 1 1
1. Find Boolean Expression in SOP and POS form from the truth table? 2. Simplify the SOP Expression above using Boolean Algebra? 3. Minimize the SOP Expression using Karnaugh Map. 4. Draw the simplified circuit.
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
Kompetensi Teras Kegemilangan
B AC B AC