Académique Documents
Professionnel Documents
Culture Documents
Boolean Algebra
Professor Chien-Mo James Li
Graduate Institute of Electronics Engineering
National Taiwan University
Logic Design
NTUEE C.M. Li
Review Questions
How many negative representations ?
How to do addition in 2C? In 1C?
How many binary codes to represent decimal numbers?
Logic Design
NTUEE C.M. Li
Outline
Introduction.
Basic Operations.
Boolean Expressions and Truth Tables.
Basic Theorems.
Commutative, Associative, and Distributive Laws.
Simplification Theorems.
Multiplying Out and Factoring.
DeMorgan's Laws.
Logic Design
NTUEE C.M. Li
Logic Design
NTUEE C.M. Li
Introduction
Boolean Algebra (also known as switching algebra)
Logic Design
NTUEE C.M. Li
Boolean Variables
Boolean variables represent the input or output of a switching
circuit
Such as X, Y
0 or 1
Logic Design
NTUEE C.M. Li
Outline
Introduction.
Basic Operations.
Boolean Expressions and Truth Tables.
Basic Theorems.
Commutative, Associative, and Distributive Laws.
Simplification Theorems.
Multiplying Out and Factoring.
DeMorgan's Laws.
Logic Design
NTUEE C.M. Li
Complement
Aka. Inverse or NOT operation
X or X
Section 2.2, p. 35
Logic Design
NTUEE C.M. Li
AND
C = AB (or C = AB)
C = 1 iff (if and only if) A and B are both 1
Otherwise output C is 0
00=0 01=0 10=0 11=1
Symbol
p. 36
NTUEE C.M. Li
Logic Design
OR
C = A+B
C = 1 iff A or B (or both ) is 1
Otherwise, C =0
0+0=0 1+0=1 0+1=1 1+1=1
Symbol
p. 36
Logic Design
NTUEE C.M. Li
10
Switching Circuits
Apply Boolean algebra to describe switching circuits
Special Notice
In Chinese, is confusing
= on or open?? = off or close??
DO NOT USE !!
Logic Design
NTUEE C.M. Li
11
AND
T = AB
p. 36
Logic Design
NTUEE C.M. Li
12
OR
T = A+B
p. 37
Logic Design
NTUEE C.M. Li
13
Outline
Introduction.
Basic Operations.
Boolean Expressions and Truth Tables.
Basic Theorems.
Commutative, Associative, and Distributive Laws.
Simplification Theorems.
Multiplying Out and Factoring.
DeMorgan's Laws.
Logic Design
NTUEE C.M. Li
14
Boolean Expressions
Boolean expressions are formed by application of basic operations
to one or more variables or constants
Simple expressions
0
X
X
Complicated expressions
AB+C
[A(C+D)] + BE
Logic Design
NTUEE C.M. Li
15
NTUEE C.M. Li
16
Evaluation
A Boolean expression is evaluated by substituting a value of 0 or 1
for each variable
Example:
If A=B=C=1; D=E=0
Then [A(C+D)]+BE = [1(1+0)]+1.0=[1(1)]+0 = 0+0=0
Logic Design
NTUEE C.M. Li
17
Literal
Each appearance of a variable or its complement in an expression is
referred as a literal
Example
abc+ab+abc+bc has 10 literals
Not 3
Not 6
Logic Design
NTUEE C.M. Li
18
Truth Table
Truth Table specifies the values of a Boolean expression for every
possible combination of values of the variables in the expression
19
NTUEE C.M. Li
Logic Design
TABLE 2-1
A
AB
AB+C
A+C
B+C
(A+C)(B+C)
Logic Design
NTUEE C.M. Li
20
Outline
Introduction.
Basic Operations.
Boolean Expressions and Truth Tables.
Basic Theorems.
Commutative, Associative, and Distributive Laws.
Simplification Theorems.
Multiplying Out and Factoring.
DeMorgan's Laws.
NTUEE C.M. Li
Logic Design
21
Basic Theorems
Operations with 0 and 1 (P.39)
X+0=X
X+1=1
X1=X
X0=0
Idempotent Law
X+X=X XX=X
Involution Law
(X)=X
Laws of complementarity
X+X=1 XX=0
Logic Design
NTUEE C.M. Li
22
Logic Design
NTUEE C.M. Li
23
p. 40
Logic Design
NTUEE C.M. Li
24
p. 40
Logic Design
NTUEE C.M. Li
25
p. 40
Logic Design
NTUEE C.M. Li
26
p. 40
Logic Design
NTUEE C.M. Li
27
p. 40
Logic Design
NTUEE C.M. Li
28
Outline
Introduction.
Basic Operations.
Boolean Expressions and Truth Tables.
Basic Theorems.
Commutative, Associative, and Distributive Laws.
Simplification Theorems.
Multiplying Out and Factoring.
DeMorgan's Laws.
Logic Design
NTUEE C.M. Li
29
Commutative Law
AND
XY = YX
OR
X+Y = Y+X
Logic Design
NTUEE C.M. Li
30
Associative Law
AND
OR
31
NTUEE C.M. Li
Logic Design
XY
YZ
(XY)Z
X(YZ)
Logic Design
NTUEE C.M. Li
32
NTUEE C.M. Li
33
FFT
Number of gates is reduced simply by associative law? Really?
Logic Design
NTUEE C.M. Li
34
X(Y+Z) = XY+XZ
NTUEE C.M. Li
Logic Design
35
X+YZ=(X+Y)(X+Z)
Only valid for Boolean algebra!
(X+Y)(X+Z) =
Logic Design
NTUEE C.M. Li
36
Outline
Introduction.
Basic Operations.
Boolean Expressions and Truth Tables.
Basic Theorems.
Commutative, Associative, and Distributive Laws.
Simplification Theorems.
Multiplying Out and Factoring.
DeMorgan's Laws.
NTUEE C.M. Li
Logic Design
37
Simplification Theorems
P.42
XY+XY=X
(X+Y)(X+Y)=X
X+XY=X
X(X+Y) = X
(X+Y)Y=XY
XY+Y = X+Y
(2-12)
(2-12D)
(2-13)
(2-13D)
(2-14)
(2-14D)
D means Dual
Logic Design
NTUEE C.M. Li
38
Proofs
P.43
2-13
2-13D
2-14D
NTUEE C.M. Li
Logic Design
39
Logic Design
(eq. 2-14D)
NTUEE C.M. Li
40
Equivalent Circuits
Circuit (a) can be replaced by circuit (b)
NTUEE C.M. Li
41
More Examples
P.43 and P.44
Examples 1
Example 2
Example 3
Logic Design
NTUEE C.M. Li
42
Logic Design
NTUEE C.M. Li
43
Outline
Introduction.
Basic Operations.
Boolean Expressions and Truth Tables.
Basic Theorems.
Commutative, Associative, and Distributive Laws.
Simplification Theorems.
Multiplying Out and Factoring.
DeMorgan's Laws.
Logic Design
NTUEE C.M. Li
44
Examples of SOP
AB+CDE+ACE
(eq. 2-15)
Degenerated cases:
ABC+DEFG+H (eq. 2-16)
Non-SOP
(A+B)CD+EF
NTUEE C.M. Li
Logic Design
45
Multiplying out
Using the Second Distributive Law helps to obtain SOP
Example (p.45)
Logic Design
NTUEE C.M. Li
46
Degenerated cases
(A+B)(C+D+E)F (eq. 2-19)
Non-POS
(A+B)(C+D)+EF
NTUEE C.M. Li
Logic Design
47
Factor AB+CD
AB+CD = (AB+C)(AB+D)=(A+C)(B+C)(A+D)(B+D)
Example 2. P.45
Example 3. P. 46
Logic Design
NTUEE C.M. Li
48
POS SOP
Factoring
SOP POS
Logic Design
NTUEE C.M. Li
49
SOP
SOP can be realized by one or more AND gates feeding a single OR
gate
NTUEE C.M. Li
50
POS
POS can be realized by one or more OR gates feeding a single AND
gate
NTUEE C.M. Li
51
Logic Design
NTUEE C.M. Li
52
Outline
Introduction.
Basic Operations.
Boolean Expressions and Truth Tables.
Basic Theorems.
Commutative, Associative, and Distributive Laws.
Simplification Theorems.
Multiplying Out and Factoring.
DeMorgan's Laws.
Logic Design
NTUEE C.M. Li
53
Logic Design
NTUEE C.M. Li
54
DeMorgans Laws
(X+Y) = XY (eq. 2-21)
Applicable to n variables
Logic Design
NTUEE C.M. Li
55
Examples
Example 1, (P.47)
Example 2, (P.47)
Be careful! Apply De Morgans law one level at a time, i.e. preserve
the order of operations
(C+AB) = C (AB) = C (A+B)
(C+AB) CA+B
WRONG!
Logic Design
NTUEE C.M. Li
56
Dual
Given a Boolean expression, the dual is formed by replacing
Logic Design
NTUEE C.M. Li
57
Logic Design
NTUEE C.M. Li
58
ANS:
Logic Design
NTUEE C.M. Li
59
Supplement Lecture
Logic Design
NTUEE C.M. Li
60
Usages of Dual
1. Duality helps to prove theorems faster and easier
2. Duality helps to factor faster
NTUEE C.M. Li
Logic Design
61
Dual
X1=X
Another example
XY+XY=X
Dual
(X+Y)(X+Y) =X
NOTE: pay special attentions to parentheses
Logic Design
NTUEE C.M. Li
62
Logic Design
NTUEE C.M. Li
63
Example (p. 45 )
Factor AB+CD
Logic Design
NTUEE C.M. Li
64
Dual
SOP
POS
factoring
Multiply out
POS
SOP
Dual
NTUEE C.M. Li
Logic Design
65
Next Time
ch 1 Introduction Number Systems
and Conversion
ch 2 Boolean Algebra
(change to Rm.105, 9am to 12pm)
Or attend other classes on 9/26
ch 3 Boolean Algebra (contd)
holiday no class
ch 4. Application of Boolean Algebra
ch 5 Karnaugh Maps
ch 7 Multi-Level Gate Circuits;
NAND NOR Gates
ch 8 Combinational Ckt Design
Midterm
Logic Design
NTUEE C.M. Li
66