ECE2030 Introduction to Computer Engineering Lecture 5: Boolean Algebra Prof. Hsien-Hsin Sean Lee Prof. Hsien-Hsin Sean Lee School of Electrical and Computer Engineering School of Electrical and Computer Engineering Georgia Tech Georgia Tech
ECE2030 Introduction to Computer Engineering
Lecture 5: Boolean Algebra
Prof. Hsien-Hsin Sean LeeProf. Hsien-Hsin Sean Lee
School of Electrical and Computer EngineeringSchool of Electrical and Computer Engineering
Georgia 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 function
A 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 1
0 1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
1 0 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
1 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·B
NULL
5
Precedence of Operators• Precedence of Operator Evaluation (Similar
to decimal arithmetic)– () : Parentheses– NOT– AND– OR EBA)DCB(AF
6
Function Evaluation
EBA)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 XXYX
Law) s(DeMorgan' YX YX
ive)(Distribut XZXY Z)X(Y
ve)(Associati ZY)(X Z)(YX
ve)(Commutati X Y Y X
Law)n (Involutio XX
t)(Complemen 1XX
Law)t (Idempoten XXX
11X
(Identity) X0X
8
Derivation of Simplification
YXX
YXY)(1X
YXXYX
)YX(XX
YXYXX
YX
9
Derivation of Consensus Theorem
YZZXXY
)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 4
BCAF
BC)A(F
A
C
B
A C
B
Vdd
F
15
Another Way to Draw It
BCAF
B)C(AF
A
C
B
A C
B
Vdd
F