You are on page 1of 17

DIGITAL LOGIC AND

COMPUTER ORGANIZATION
Lecture 2: Boolean Algebra
ELEC3010
ACKNOWLEGEMENT

I would like to express my special thanks to Professor Zhiru Zhang


School of Electrical and Computer Engineering, Cornell University
and Prof. Rudy Lauwereins, KU Leuven for sharing their teaching
materials.

2
CAN YOU DO IT?
char c1 = -12;
unsigned char c2=131;

How are c1 and c2 stored in the memory?

3
COVERED IN THIS COURSE
❑ Binary numbers and logic gates
❑ Boolean algebra and combinational logic
❑ Sequential logic and state machines
❑ Binary arithmetic
Digital logic
❑ Memories

❑ Instruction set architecture


❑ Processor organization Computer
❑ Caches and virtual memory
❑ Input/output Organization
❑ Advanced topics
4
AXIOMATIC DEFINITION OF BOOLEAN ALGEBRA
• Statements that are assumed true
• Obey the principle of duality
– Interchange 1 and 0, AND and OR, still correct
– Many axioms come in pairs

▪ Binary
(A1) X = 0 if X ≠ 1 (A1’) X = 1 if X ≠ 0

▪ Complement
(A2) If X = 0, then X’ = 1 (A2’) If X = 1, then X’ = 0
5
AXIOMATIC DEFINITION OF BOOLEAN ALGEBRA

▪ AND and OR

(A3) 0•0=0 (A3’) 1+1=1


(A4) 1•1=1 (A4’) 0+0=0
(A5) 0•1=1•0=0 (A5’) 1+0=0+1=1

▪ A1-A5 completely define Boolean algebra


– Everything else derived from these axioms

6
SINGLE VARIABLE THEOREMS

▪ Identity: (T1) X•1=X (T1’) X+0=X


▪ Null Element: (T2) X•0=0 (T2’) X+1=1
▪ Idempotency: (T3) X•X=X (T3’) X+X=X
▪ Involution: (T4) (X’)’=X
▪ Complements: (T5) X•X’=0 (T5’) X+X’=1

Can prove by perfect induction


– Show that all possible inputs meet the theorem
7
TWO AND THREE VARIABLE THEOREMS

▪ Commutativity
(T6) X•Y = Y•X (T6’) X+Y = Y+X
▪ Associativity
(T7) (X•Y)•Z = X•(Y•Z) (T7’) (X+Y)+Z = X+(Y+Z)
▪ Distributivity
(T8) X•Y+X•Z = X•(Y+Z) (T8’) (X+Y)•(X+Z) = X+(Y•Z)
AND distributes over OR OR distributes over AND
8
DE MORGAN’S THEOREM

▪ So important, also known as De Morgan’s Law


(T9) (X1•X2•…•Xn)’ = X1’+X2’+…+Xn’

(T9’) (X1+X2+…+Xn)’ = X1’•X2’•…•Xn’

9
DE MORGAN’S THEOREM

▪ By DeMorgan’s Law
(X•Y•Z)’ = X’+Y’+Z’
Proof by perfect induction

10
BOOLEAN FUNCTIONS

▪ What: expression in binary variables and the operators


AND, OR, NOT
▪ Priority:
o parenthesis F=X.Y.Z + X’.Y + Y’.Z
o NOT
o AND
o OR

11
BOOLEAN FUNCTIONS
Some definitions:
▪ Normal term: Product or sum term in which every variable
appears, and exactly once
▪ Minterm: Normal product
e.g., (X•Y’•Z) for a 3-input Boolean function
▪ Maxterm: Normal sum
e.g., (X’+Y+Z’)
12
BOOLEAN FUNCTIONS

13
CANONICAL FORM

▪ How do we translate a truth table into a


Boolean expression?
▪ Canonical Sum of a Logic Function (Canonical
SOP)
o Sum of minterms that correspond to the on-
set of a function
o On-set: Input combinations that make F=1

F = X’•Y’•Z’ + X’•Y•Z + X•Y’•Z’ + X•Y•Z


= ΣX,Y,Z(0,3,4,7)
14
CANONICAL FORM

▪ Canonical Product of a Logic Function


(Canonical POS)
o Product of maxterms that correspond to
the off-set of a function
o Off-set: Input combinations that make F=0

F = (X+Y+Z’)•(X+Y’+Z)•(X’+Y+Z’)•(X’+Y’+Z)
=  X,Y,Z(1,2,5,6)

F =  X,Y,Z (1,2,5,6) = ΣX,Y,Z(0,3,4,7)


15
CAN YOU DO IT?

16
BEFORE NEXT CLASS

• Textbook: 1.4-1.7

17

You might also like