0% found this document useful (0 votes)
10 views56 pages

Computer Architecture: Lecture 3 - Boolean Algebra

The document covers Boolean Algebra, focusing on concepts such as Karnaugh Maps, Sum of Products, and Product of Sums. It explains the laws of Boolean algebra, methods for simplifying Boolean functions, and the implementation of these functions using Karnaugh Maps. Exercises are included to reinforce understanding of converting between different forms and simplifying Boolean expressions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views56 pages

Computer Architecture: Lecture 3 - Boolean Algebra

The document covers Boolean Algebra, focusing on concepts such as Karnaugh Maps, Sum of Products, and Product of Sums. It explains the laws of Boolean algebra, methods for simplifying Boolean functions, and the implementation of these functions using Karnaugh Maps. Exercises are included to reinforce understanding of converting between different forms and simplifying Boolean expressions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 56

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

• Sum of Products - consider 1s


A B X – Consider A=1,B=1

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

▪ Convert the following equation which is in


the form of Product-of-sums into the form of
Sum-of-products
Answer: Exercise 1
Boolean Postulates

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

▪ A Boolean function can be realised in either


SOP or POS form
▪ At this point, it would seem that the choice
would depend on whether the truth table
contains more 1s and 0s for the output
function
▪ The SOP has one term for each 1, and the
POS has one term for each 0
Implementation of Boolean Functions

▪ However, there are other considerations:


⮚ It is generally possible to derive a simpler
Boolean expression from truth table than either
SOP or POS
⮚ It may be preferable to implement the function
with a single gate type (NAND or NOR)
Implementation of Boolean Functions

▪ The significance of this is that, with a


simpler Boolean expression, fewer gates
will be needed to implement the function
▪ Methods that can be used to achieve
simplification are:
⮚ Algebraic Simplification
⮚ Karnaugh Maps
Your Turn: Algebraic Simplification

▪ Simplify the following equation using


Boolean algebra laws
Answer: Algebraic Simplification
Karnaugh Maps

▪ For purposes of simplification, the


Karnaugh map is a convenient way of
representing a Boolean function of a small
number (up to 4 to 6) of variables
▪ The map is an array of 2n squares,
representing the possible combinations of
values of n binary variables
Karnaugh Maps

▪ The map can be used to represent any


Boolean function in the following way:
⮚ Each square corresponds to a unique product
in the sum-of-products form.
⮚ With a 1 value corresponding to the variable
and a 0 value corresponding to the NOT of that
variable
Karnaugh Maps: 2 Values

B
A 0 1
0 0 1
1 1 1
Karnaugh Maps: 2 Values

▪ The AB corresponds to the fourth square in


the Figure
▪ For each such production in the function, 1
is placed in the corresponding square
AB

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

▪ Simplify the following Karnaugh Map using Boolean


equations (Write your answers in both SOP and
POS)

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

▪ Simplify the following Karnaugh Map using Boolean


equations (Write your answers in both SOP and
POS)

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

▪ The labeling used in figure emphasizes the


relationship between variables and the rows and
columns of the map
C

▪ The two rows embraced


by the symbol A are those
in which the variable A
has the value 1; the rows B

not embraced by the A


symbol A are those in
which A is 0
D
Simplified Labeling of Karnaugh Maps

▪ Once the map of a function is created, we can


often write a simple algebraic expression for it by
noting the arrangement of the 1s on the map
▪ The principle is as follows:
⮚ Any two squares that are adjacent differ in only one of
the variables
⮚ If two adjacent squares both have an entry of 1, then
the corresponding product terms differ in only one
variable
⮚ In such a case, the two terms can be merged by
eliminating that variable
Simplified Labeling of Karnaugh Maps
▪ For example, in following FIGURE, the two
adjacent squares correspond to the two terms
ABCD and ABCD
CD

▪ The function expressed is


ABCD + ABCD = ABD
1 1
AB
Simplified Labeling of Karnaugh Maps
▪ This process can be extended in several
ways:
⮚ First, the concept of adjacent can be extended
to include wrapping around the edge of the
map
⮚ Thus, the top square of a column is adjacent
to the bottom square, and the leftmost
square of a row is adjacent to the rightmost
square
⮚ Second, we can group not just 2 squares but 2 n
adjacent squares, that is, 4, 8, etc
Your turn: 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

▪ In attempting to simplify, first look for the


largest grouping possible:
⮚ When you are circling groups, you are allowed
to use the same 1 more than once
⮚ If any isolated 1s remain after the groupings,
then each of these is circled as a group of 1s
⮚ Finally, before going from the map to a
simplified Boolean expression, any group of 1s
that is completely overlapped by other
groups can be eliminated
Karnaugh Maps: Overlapping Groups

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

You might also like