Upload
hsien-hsin-lee
View
440
Download
2
Embed Size (px)
Citation preview
ECE2030 Introduction to Computer Engineering
Lecture 5: Boolean Algebra
Prof. Hsien-Hsin Sean LeeProf. Hsien-Hsin Sean LeeSchool of Electrical and Computer EngineeringSchool of Electrical and Computer EngineeringGeorgia TechGeorgia Tech
2
What is Boolean Algebra• An algebra dealing with
– Binary variables by alphabetical letters– Logic operations: OR, AND, XOR, etc
• Consider the following Boolean equation
ZZYYXZ)Y,F(X,
• A Boolean function can be represented by a truth table which list all combinations of 1’s and 0’s for each binary value
3
Fundamental Operators• NOT
– Unary operator– Complements a Boolean variable represented
as A’, ~A, or Ā• OR
– Binary operator– A “OR”-ed with B is represented as A + B
• AND– Binary operator– A “AND”-ed with B is represented as AB or A·B– Can perform logical multiplication
4
Binary Boolean Operations• All possible outcomes of a 2-input Boolean
functionA B F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 10 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 11 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 11 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
A·B AB
A+B Identity
A
B
ĀBA+B
AB
A·BNULL
5
Precedence of Operators• Precedence of Operator Evaluation (Similar
to decimal arithmetic)– () : Parentheses– NOT– AND– OR EBA)DCB(AF
6
Function EvaluationEBA)DCB(AF
ABCDE=00000
0011011)00(0
010)010(0000)000(0F
ABCDE=10000
1001110)00(1
010)010(1001)000(1F
7
Basic Identities of Boolean Algebra
Theorem) (Consensus ZXXYYZZXXY
ation)(Simplific YXYXX
Law)n (Absorptio XXYXLaw) s(DeMorgan' YX YX
ive)(Distribut XZXY Z)X(Yve)(Associati ZY)(X Z)(YX
ve)(Commutati X Y Y XLaw)n (Involutio XX
t)(Complemen 1XX
Law)t (Idempoten XXX 11X
(Identity) X0X
8
Derivation of SimplificationYXX
YXY)(1X
YXXYX
)YX(XX
YXYXX
YX
9
Derivation of Consensus TheoremYZZXXY
)X(XYZZXXY
YZXXYZZXXY
Y)Z(1XZ)XY(1
ZXXYYZZXXY
ZXXY
10
Duality Principle• A Boolean equation remains valid if
we take the dual of the expressionsdual of the expressions on both sides of the equals sign
• Dual of expressions – Interchange 1’s and 0’s– Interchange AND () and OR (+)
11
Duality PrincipleX1X X0X
00X 11X
0XX 1XX
XYYX XYYX
XXX XXX
Z)(XY)(XZYX XZXYZ)X(Y
YXYX YXYX
XY)(XX X YXX
YXY)X(X YX YXX
Z)XY)((XZ)Z)(YXY)((X ZXXY YZZXXY
12
Simplification Examples
?XZZYXYZXF (1)
?YXZXYF (2)
?EDCBADCBACBABAAF (3)
C)(B A
)CBC)((BA BC)CBA( Prove (4)
13
DeMorgan’s Law
BABA
BABA
14
Example in Lecture 4BCAF
BC)A(F
A
C
B
A C
B
Vdd
F
15
Another Way to Draw ItBCAF
B)C(AF
A
C
B
A C
B
Vdd
F