Professional Documents
Culture Documents
│LECTURE 5│
│
Boolean Algebra
Learning Objectives
1. Boolean algebra
2. Truth tables
Week 1
© Vocational Training Council, Hong Kong
Boolean Algebraic Rules
Fundamental Laws
OR : (X+0) = X ; (X+1) = 1 ; (X+X) = X ; (X+X’) = 1
AND : (X)(0) = 0 ; (X)(1) = X ; (X)(X) = X ; (X)(X’) = 0
Associative Law
(X + Y) + Z = X + (Y + Z) ; (XY)Z = X(YZ)
Commutative Law
X+Y=Y+X; X.Y = Y.X
Distributive Law
X(Y + Z) = XY + XZ; (W + X)(Y + Z) = WY + XY + WZ + XZ
Auxiliary Identities
X(X + Y) = X + XY = X
X + YZ = (X + Y)(X + Z) = X + YZ + XY + XZ
Example
Show that A.B.(B.C + A’ )’ is equal to A.B.C’ by means of truth table.
Solution
The truth table for the left hand side expression is as shown in Figure
5-2. From the truth table, it can easily be seen that it is equal to
A.B.C’
2 Week 1
© Vocational Training Council, Hong Kong
EEE3411 Electronics
Example
Show that A ( A’ + B ) = A + B by using truth table.
Solution
From the truth table shown in Figure 5-3, it is obvious that the given
statement is true.
DeMorgan’s Laws
These laws are frequently used.
Week 3
© Vocational Training Council, Hong Kong
Verification of the DeMorgan’s law by truth table.
The rest of the DeMorgan’s laws may be verified in the similar way.
4 Week 1
© Vocational Training Council, Hong Kong
EEE3411 Electronics
SOP Expression
The Boolean expression obtained in the translation method used in
previous example is known as SOP (Sum of Product) expression.
In the previous example, if F is the output, then
F = A’BC + AB’C’ + AB’C + ABC’ + ABC
Each product in a SOP is called a Minterm (or, standard product)
POS Expression
Another translation method is POS (Product of Sum). This is the
method by picking up all these input combinations which produce logic
low output (‘0’ or false state). For the previous example, F may be
written as
F’ = A’B’C’ + A’B’C + A’BC’
or F = [A’B’C’ + A’B’C + A’BC’]’
or F = (A + B + C)(A + B + C’)(A + B’ + C)
by applying the DeMorgan’s law.
So, a POS function is a AND product of OR sums.
Each sum in a POS is called a Maxterm (or, standard sum)
Fig 5-7 Minterm and maxterm table for two variables A and B
Week 5
© Vocational Training Council, Hong Kong
Minterm and maxterm table for four variables A, B and C.
Fig 5-8 Minterm and maxterm table for three variables A, B and C
Fig 5-9 Minterm and maxterm table for three variables A, B, C and D
6 Week 1
© Vocational Training Council, Hong Kong
EEE3411 Electronics
4. Algebraic minimization
Example
Simplify the following Boolean expressions using the laws of Boolean
algebra.
(1) x + x’y
(2) (A’ + B + C + D)’ + (AB’C’D)
(3) (q + r) (q’ + r’)
Solution
(1) x + x’y
= x + x’y = (x + x’) (x + y)
= 1 . (x+y)
= x+y
(2) (A’ + B + C + D)’ + (AB’C’D)
= AB’C’D’ + AB’C’D
= AB’C’ (D’ + D)
= AB’C’
(3) (q + r) (q’ + r’)
= qq’ + rq’ + qr’ + rr’
= 0 + rq’ + qr’ + 0
= rq’ + qr’
Week 7
© Vocational Training Council, Hong Kong
More difficult examples are given below for further illustration.
Example
Simplify the following Boolean functions using the laws of Boolean
algebra.
(1) D = A’BC + AB’C + ABC + BC’
(2) W = Y’(X + Z) + Z(X’ + Y) + XZ
(3) F = A’C + A’B + AB’C + BC
Solution
8 Week 1
© Vocational Training Council, Hong Kong
EEE3411 Electronics
K-map is a map which shows the relation between the input and output of
a logic expression. It’s function is like a truth table.
Truth table uses ‘input’ and ‘output’ columns.
K-map uses ‘X-Y’ or ‘vertical-horizontal’ coordinates to represent a
specific combination of input and puts the corresponding output in that
coordinate, or, cell.
For a K-map to show logic AND, the cell AB shall be marked ‘1’, all
other cells be marked ‘0’.
Likewise, a K-map with ‘1’ in all cells except the cell A’B’ represents the
logic OR.
A K-map has 4 cells for 2 input variables, 8 cells for 3 and 16 cells for
four variables, etc. In our discussion, we will limit the number of
variables to four.
Week 9
© Vocational Training Council, Hong Kong
K-map for a Boolean function Y of three variables A , B and C.
10 Week 1
© Vocational Training Council, Hong Kong
EEE3411 Electronics
For clarity, the cells with a value of zero are left blank.
Fig 5-13 K-map for the above given Boolean function F in SOP
Fig 5-14 K-map for the above given Boolean function F in POS
Week 11
© Vocational Training Council, Hong Kong
Grouping in K-map
By grouping adjacent cells of same logic state together we can
simplify the logic expression.
Refer to the map shown in Figure 5-15.
Grouping TWO cells:
for example, A’B’C’D and A’BC’D in the 2nd row
F = .... + (A’B’C’D + A’BC’D) + ...
F = .... + (A’C’D) + ....
Grouping FOUR cells:
for example, A’B’CD, A’BCD, ABCD and AB’CD in the 3rd row
F = ....+ (A’B’CD + A’BCD + ABCD + AB’CD) + ....
F = .... + (A’CD + ACD) + ....
F = .... + (CD) + ....
Fig 5-15 Grouping in K-map for the above given Boolean function F
Fig 5-16 Final simplified K-map for the above given Boolean function F
12 Week 1
© Vocational Training Council, Hong Kong
EEE3411 Electronics
Example
Obtain the simplest SOP expression for the Boolean function F given in
Figure 5-17.
Solution
Week 13
© Vocational Training Council, Hong Kong
Group Size versus Number of Variables in K-map
For a four variables K-map
․a 1-cell group concerns 4 variables
․a 2-cell group concerns 3 variables
․a 4-cell group concerns 2 variables
․a 8-cell group concerns 1 variable only
Example
Obtain all the possible equivalent minimal solutions for the K-map
given in Figure 5-19.
14 Week 1
© Vocational Training Council, Hong Kong
EEE3411 Electronics
Solution
Week 15
© Vocational Training Council, Hong Kong
Don’t Care Terms in Boolean Function
In some practical situations, certain combinations of inputs will not
occur and so their corresponding outputs are not important.
Hence, we don’t care that ‘output’ to be marked ‘0’ or ‘1’ in a K-map or
Truth Table. We may mark it as ‘x’ or ‘d’.
A don’t care term ‘x’ may be grouped with ‘1’ or ‘0’, thus, the logic
expression and the actual circuit can be simplified.
For example, consider the following door alarm system:
․signal A and B are from two door sensors, signal C is from a clock.
․signal C is high when the time is 5:00 pm to 9:00 am (non-office
hours).
․signal A is high when door A is opened, similarly does signal B.
․if any ONE door is opened during non-office hours, alarm shall be
activated
Say, door A and door B are interlocked such that they can’t be opened at
the same time. Therefore, the input combinations ABC and ABC’ will
not occur and thus are considered as don’t care.
Example
Find the minimal SOP expression for the function given in Figure 5-23.
16 Week 1
© Vocational Training Council, Hong Kong
EEE3411 Electronics
Solution
The minimal SOP expression for the given function with don’t care
terms is given in Figure 5-24.
Fig 5-24 Solution for the example K-map with don’t care terms
Revision
Week 17
© Vocational Training Council, Hong Kong