Computer Architecture: Lecture 3 - Boolean Algebra
Computer Architecture: Lecture 3 - Boolean Algebra
Lecturer: S. Shifran
[email protected]
+94 768701466
Senior Software QA Engineer (Accel Digital - Australia)
B.Sc in IS & Master in IT ® - University of Colombo
Lesson 03 (B) –
Boolean Algebra
Karnaugh Map
Logic Equations to Truth Tables
A B X
0 0
0 1
1 0
1 1
Sum of Products
▪ The OR operation performed on the products of
the AND operation
▪ Fill the corresponding cells with 1 for each
product, the other cells with 0
A B X
0 0 1
0 1 1
1 0 0
1 1 1
Product of Sums
▪ The AND operation performed on the sums of the
OR operation
▪ Fill the corresponding cells with 0 for each sum,
the other cells with 1
A B X
0 0 1
0 1 1
1 0 0
1 1 0
Truth Tables to Logic Equations
0 0 1
0 1 1 • Product of sums – consider 0s
1 0 0 – Consider A=0,B=0
1 1 0
Your Turn: Exercise 1
0.0=0
1+1=1
0+0=0
1.1=1
1.0=0.1=0
1+0=0+1=1
Laws of Boolean Algebra
▪ Commutative Law
⮚ A+B=B+A
⮚ AB =BA
▪ Associate Law
⮚ (A + B) + C = A + (B + C)
⮚ (A B) C = A (B C)
Laws of Boolean Algebra
▪ Distributive Law
⮚ A (B + C) = A B + A C
⮚ A + (BC) = (A + B) (A + C)
▪ Identity Law
⮚ A+A=A
⮚ A.A =A
Laws of Boolean Algebra
▪ Redundancy Law
⮚ A + AB = A
⮚ A (A + B) = A
▪ Demorgan’s Theorem
⮚ .
⮚
Laws of Boolean Algebra
▪ .
▪ .
Laws of Boolean Algebra
▪ .
▪ .
Laws of Boolean Algebra
▪ .
Implementation of Boolean Functions
B
A 0 1
0 0 1
1 1 1
Karnaugh Maps: 2 Values
00 01 11 10
1 1
F = AB + AB
Karnaugh Maps: 3 Values
C
AB 00 01 11 10
0 1 1 0 0
1 0 0 1 1
A’ B’ A’ B AB A B’
CD
AB 00 01 11 10
C’ D’ 1 0 1 1
00
C’ D 0 1 1 0
01
CD 0 1 1 0
11
C D’ 0 1 0 1
10
Karnaugh Maps: 4 Values
CD
AB 00 01 11 10
00 1 0 1 1
01 0 1 1 0
11 0 1 1 0
10 0 1 0 1
AB’CD’
Karnaugh Maps: Exercise 1
C
AB 00 01 11 10
0 0 1 0 0
1 1 1 0 1
Karnaugh Maps: Answer
C
AB 00 01 11 10
0 0 1 0 0
1 1 1 0 1
Karnaugh Maps: Exercise 2
CD
AB 00 01 11 10
00 1 0 0 1
01 0 1 1 0
11 0 0 1 0
10 1 0 0 1
Karnaugh Maps: Answer
CD
AB 00 01 11 10
00 1 0 0 1
01 0 1 1 0
11 0 0 1 0
10 1 0 0 1
Karnaugh Maps: Answer
CD
AB 00 01 11 10
00 1 0 0 1
01 0 1 1 0
11 0 0 1 0
10 1 0 0 1
Simplified Labeling of Karnaugh Maps
CD
AB
1
Answer: Karnaugh Maps
CD
AB
BCD
1
Your turn: Karnaugh Maps
CD
1 1
AB
Answer: Karnaugh Maps
CD
1 1
AB
ABD
Your turn: Karnaugh Maps
CD
1 1 1 1
AB
Answer: Karnaugh Maps
CD
1 1 1 1
AB
AB
Your turn: Karnaugh Maps
CD
1 1
AB
1 1
Answer: Karnaugh Maps
CD
1 1
AB
BC
1 1
Your turn: Karnaugh Maps
CD
1 1 1 1
1 1 1 1
AB
Answer: Karnaugh Maps
CD
1 1 1 1
1 1 1 1
AB
A
Your turn: Karnaugh Maps
CD
1 1
1 1
AB
1 1
1 1
Answer: Karnaugh Maps
CD
1 1
1 1
AB
C
1 1
1 1
Simplified Labeling of Karnaugh Maps
CD
BC
00 01 11 10
00 01 11 10 00
0 1 1 1
A AB 01
1 1
11 1 1
F = AB + BC 10 1
F = BCD +ACD
Your turn: Karnaugh Maps
CD
0 0 0 0
0 0 0 1
AB
1 1 0 1
1 1 1 1
Answer: Karnaugh Maps
CD
F = AC + AB + BCD
0 0 0 0
F = (A+C).(A+B).(B+C+D)
0 0 0 1
AB
1 1 0 1
1 1 1 1
Drawing a Circuit
Drawing a Circuit
B+AC
Drawing a Circuit
B+AC
Thank You