Topic 2
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
TOPIC 2 : BOOLEAN<br />
OPERATIONS
Example of timing diagram
Logic Gates Symbols & Boolean<br />
Equation
Truth Table<br />
•<br />
A truth table is a mathematical table used in<br />
logic – specifically in connection with Boolean<br />
algebra, Boolean function and propositional<br />
calculus.<br />
•<br />
Practically, a truth table is composed of one<br />
column for each input variable (for example A<br />
and B) and A one B A.B final column for all of the<br />
possible<br />
0results 0 0of the logical operation that<br />
0 1 0<br />
Truth Table<br />
the table is meant to represent (for example A<br />
1 0 0<br />
AND B)<br />
1 1 1
Example 1:
Example 2:<br />
A<br />
D = A + B.C<br />
B.C<br />
Example 3:<br />
A + B<br />
D = (A + B).(A + C)<br />
A + C
Example 4:<br />
Example 5:
NAND gates equivalent in combinational logic gates<br />
Universal<br />
combinational<br />
gates<br />
A<br />
B<br />
C<br />
F<br />
NAND gates<br />
equivalent<br />
combinational<br />
gates<br />
A<br />
B<br />
F<br />
C<br />
F = (A+B).(A+B).C
Exercise:<br />
Boolean Expression =
Construct a Truth Table from Boolean Expression<br />
•<br />
Example: Output S(T+U) + TU<br />
•<br />
Solution:<br />
S T U T+U S(T+U) TU S(T+U) + TU<br />
0 0 0 0 0 0 0<br />
0 0 1 1 0 0 0<br />
0 1 0 1 0 0 0<br />
0 1 1 1 0 1 1<br />
1 0 0 0 0 0 0<br />
1 0 1 1 1 0 1<br />
1 1 0 1 1 0 1<br />
1 1 1 1 1 1 1
Construct a Combinational Logic Circuit from<br />
Boolean Expression:<br />
•<br />
Example: Y = AC + B + BC<br />
•<br />
Solution:
Construct a Boolean Expression from<br />
Combinational Logic Circuit:
Construct A Boolean expression from truth<br />
table<br />
A B C Y<br />
0 0 0 1<br />
0 0 1 0<br />
0 1 0 1<br />
0 1 1 1<br />
1 0 0 0<br />
1 0 1 0<br />
1 1 0 0<br />
1 1 1 1<br />
Answer:<br />
Boolean expression: (SUM OF<br />
PRODUCT – SOP)<br />
+ +
Boolean Law & DeMorgan’s Theorems<br />
Commutative<br />
Law<br />
Associative<br />
Law<br />
Distributive<br />
Law<br />
Consensus<br />
Theorem<br />
DeMorgan’s<br />
22<br />
X<br />
X<br />
9)<br />
1<br />
X<br />
X<br />
8)<br />
X<br />
X<br />
X<br />
7)<br />
1<br />
1<br />
X<br />
6)<br />
X<br />
0<br />
X<br />
5)<br />
0<br />
X<br />
X<br />
4)<br />
X<br />
X<br />
X<br />
3)<br />
X<br />
1<br />
X<br />
2)<br />
0<br />
0<br />
X<br />
1)<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Y<br />
X<br />
Y<br />
X<br />
14B)<br />
Y<br />
X<br />
X Y<br />
14A)<br />
Y<br />
X<br />
XY<br />
X<br />
13D)<br />
Y<br />
X<br />
XY<br />
X<br />
13C)<br />
Y<br />
X<br />
XY<br />
X<br />
13B)<br />
Y<br />
X<br />
XY<br />
X<br />
13A)<br />
YZ<br />
YW<br />
XZ<br />
XW<br />
Z<br />
W<br />
Y<br />
X<br />
12B)<br />
XZ<br />
XY<br />
Z<br />
Y<br />
X<br />
12A)<br />
Z<br />
Y<br />
X<br />
Z<br />
Y<br />
X<br />
11B)<br />
Z<br />
XY<br />
YZ<br />
X<br />
11A)<br />
X<br />
Y<br />
Y<br />
X<br />
10B)<br />
X<br />
Y<br />
Y<br />
X<br />
10A)
Simplify The Boolean Expression:<br />
Example of simplification
Boolean Law Example
Boolean Law<br />
example
DeMorgan Shortcut<br />
BREAK THE LINE, CHANGE THE SIGN<br />
Break the LINE over the two variables,<br />
and change the SIGN directly under the line.<br />
A<br />
B<br />
<br />
A<br />
<br />
B<br />
For Theorem #14A, break the line, and<br />
change the AND function to an OR function.<br />
Be sure to keep the lines over the variables.<br />
A<br />
B<br />
<br />
A<br />
B<br />
For Theorem #14B, break the line, and<br />
change the OR function to an AND function.<br />
Be sure to keep the lines over the variables.<br />
26
DeMorgan’s: Example #1<br />
Example<br />
Simplify the following Boolean expression and note the<br />
Boolean or DeMorgan’s theorem used at each step. Put<br />
the answer in SOP form.<br />
Solution<br />
F<br />
1<br />
F<br />
1<br />
F<br />
1<br />
F<br />
1<br />
F<br />
1<br />
(X Y) (Y<br />
<br />
(X Y) <br />
(X Y)<br />
(X Y)<br />
<br />
XY<br />
<br />
YZ<br />
(Y<br />
F<br />
<br />
1<br />
Z)<br />
Z)<br />
(Y Z)<br />
(Y Z)<br />
(X Y) (Y<br />
<br />
Z)<br />
; Theorem #14A<br />
; Theorem #9 & #14B<br />
; Theorem #9<br />
; Rewritten without AND symbols<br />
and parentheses<br />
27
DeMorgan’s: Example #2<br />
So, where would such an odd Boolean expression come from? Take a<br />
look at the VERY poorly designed logic circuit shown below. If you were<br />
to analyze this circuit to determine the output function F2, you would<br />
obtain the results shown.<br />
X<br />
Y<br />
XY<br />
X<br />
XY<br />
( X <br />
Z)(XY)<br />
F 2<br />
(X Z)(XY)<br />
Z<br />
X Z<br />
Example<br />
Simplify the output function F2. Be sure to note the Boolean or<br />
28
DeMorgan’s: Example #2<br />
Solution<br />
F<br />
2<br />
<br />
(X<br />
<br />
Z)(XY)<br />
F<br />
2<br />
<br />
(X<br />
<br />
Z)<br />
<br />
(XY)<br />
; Theorem #14A<br />
F<br />
2<br />
<br />
(X<br />
<br />
Z)<br />
<br />
(XY)<br />
; Theorem #9<br />
F<br />
2<br />
<br />
(X Z)<br />
<br />
(XY)<br />
; Theorem #14B<br />
F<br />
F<br />
2<br />
2<br />
<br />
<br />
(X Z) (XY)<br />
X Z X Y<br />
; Theorem #9<br />
; Rewritten without AND symbols<br />
29
SUM OF PRODUCT (SOP)
Logic Expression from Truth table<br />
•<br />
SUM Of PRODUCT
PRODUCT OF SUM (POS)<br />
POS<br />
POS
CONVERSION OF SOP POS TERM<br />
Take as an example the truth table of a three-variable function as shown below.<br />
Three variables, each of which can take the values 0 or 1, yields eight possible<br />
combinations of values for which the function may be true. These eight<br />
combinations are listed in ascending binary order and the equivalent decimal value is<br />
also shown in the table.<br />
The function has a value 1 for the<br />
combinations shown, therefore:
CONVERSION OF SOP POS TERM
Examples of function in Boolean<br />
•<br />
Consider the function:<br />
•<br />
In binary form:<br />
f(A, B, C, D) = ∑ (0101, 1011, 1100, 0000,<br />
1010, 0111)<br />
•<br />
In decimal form:<br />
f(A, B, C, D) = ∑ (5, 11, 12, 0, 10, 7)
KARNAUGH MAP (K-MAP)<br />
•<br />
A Karnaugh Map is a grid-like representation<br />
of a truth table.<br />
•<br />
It is really just another way of presenting a<br />
truth table, but the mode of presentation<br />
gives more insight.<br />
•<br />
A Karnaugh map has zero and one entries at<br />
different positions.<br />
•<br />
Each position in a grid corresponds to a truth<br />
table entry.
Here's an example taken from the voting circuit presented in the lesson on<br />
Minterms. The truth table is shown first. The Karnaugh Map for this truth<br />
table is shown after the truth table.<br />
Truth Table<br />
K-Map<br />
representing
K-Map Condition:<br />
(i) 2 variables : Use 22 mapping condition (use either 1 only)<br />
A B F<br />
0 0 a<br />
A\B 0 1<br />
B\A 0 1<br />
0 1 b<br />
1 0 c<br />
0 a b<br />
1 c d<br />
Or<br />
0 a c<br />
1 b d<br />
1 1 d<br />
Truth table<br />
K-Map
K-Map Condition:<br />
(ii) 3 variables : Use 23 mapping condition (use either 1 only)<br />
A B C F<br />
0 0 0 a<br />
0 0 1 b<br />
0 1 0 c<br />
0 1 1 d<br />
1 0 0 e<br />
1 0 1 f<br />
1 1 0 g<br />
1 1 1 h<br />
Truth table<br />
(i)<br />
AB\C 0 1<br />
00 a b<br />
01 c d<br />
11 g h<br />
10 e f<br />
A\BC 00 01 11 10<br />
0 a b d c<br />
1 e f h g<br />
(iii)<br />
(ii)<br />
K-Map<br />
BC\A 0 1<br />
00 a e<br />
01 b f<br />
11 d h<br />
10 c g<br />
C\AB 00 01 11 10<br />
0 a c g e<br />
1 b d h f<br />
(iv)
A B C D F<br />
0 0 0 0 a<br />
0 0 0 1 b<br />
0 0 1 0 c<br />
0 0 1 1 d<br />
0 1 0 0 e<br />
0 1 0 1 f<br />
0 1 1 0 g<br />
0 1 1 1 h<br />
1 0 0 0 i<br />
1 0 0 1 j<br />
1 0 1 0 k<br />
1 0 1 1 l<br />
1 1 0 0 m<br />
1 1 0 1 n<br />
1 1 1 0 o<br />
1 1 1 1 p<br />
Truth table<br />
K-Map Condition:<br />
(iii) 4 variables : Use 24 mapping condition<br />
(use either 1 only)<br />
(i)<br />
CD<br />
AB\<br />
00 01 11 10<br />
00 a b d c<br />
01 e f h g<br />
11 m n p o<br />
10 i j l k<br />
AB<br />
CD\<br />
K-Map<br />
(ii)<br />
00 01 11 10<br />
00 a e m i<br />
01 b f n j<br />
11 d h p l<br />
10 c g o k
K-Map Looping Rules<br />
v<br />
The Karnaugh map uses the following rules for the<br />
simplification of expressions by grouping together<br />
adjacent cells containing ones.<br />
1. Groups may not include any cell containing a zero<br />
2. Groups may be horizontal or vertical, but not diagonal.
3. Groups must contain 1, 2, 4, 8, or in general 2n cells.<br />
That is if n = 1, a group will contain two 1's since 21 = 2.<br />
If n = 2, a group will contain four 1's since 22 = 4.<br />
4. Each group should be as large as possible.
5. Groups may overlap.<br />
6. Each cell containing a one must be in at least one group.
7. Groups may wrap around the table. The leftmost cell in a row may be grouped with<br />
the rightmost cell and the top cell in a column may be grouped with the bottom cell.<br />
8. There should be as few groups as possible, as long as this does not contradict<br />
any of the previous rules.
K-Map looping example:<br />
Example 1 Example 2
K-Map solution from truth table<br />
A B C F<br />
0 0 0 1<br />
0 0 1 0<br />
A’B’C’<br />
0 1 0 0<br />
0 1 1 1<br />
1 0 0 1<br />
1 0 1 1<br />
1 1 0 1<br />
1 1 1 0<br />
Truth table<br />
A’BC<br />
AB’C’<br />
AB’C<br />
ABC’<br />
F = AB’ + AC’ + B’C’ + A’BC
K-Map solution from Boolean Expression<br />
F = A’B’C’ + ABC’ + AB’C’<br />
+ A’BC + AB’C<br />
Allocate in digital logic:<br />
000 + 110 + 100 +<br />
011 + 101<br />
F = AB’ + AC’ + B’C’ + A’BC
Simplify Boolean expression using K-Map<br />
F = BD + AB’CD + ABC<br />
Represent the hidden variable (don’t care<br />
condition)<br />
è<br />
BD = ABCD, A’BCD, ABC’D, A’BC’D<br />
è<br />
ABC = ABCD, ABCD’<br />
Thus, the expression will become as:<br />
F = ABCD + A’BCD + ABC’D + A’BC’D +<br />
AB’CD + ABCD + ABCD’<br />
AB\CD 00 01 11 10<br />
00 0 0 0 0<br />
01 0 1 1 0<br />
11 0 1 1 1<br />
10 0 0 1 0<br />
Output = BD + ACD + ABC
A B C D F<br />
0 0 0 0 0<br />
0 0 0 1 0<br />
0 0 1 0 1<br />
0 0 1 1 0<br />
0 1 0 0 0<br />
0 1 0 1 1<br />
0 1 1 0 0<br />
0 1 1 1 1<br />
1 0 0 0 1<br />
1 0 0 1 0<br />
1 0 1 0 1<br />
1 0 1 1 0<br />
1 1 0 0 1<br />
1 1 0 1 1<br />
1 1 1 0 0<br />
1 1 1 1 0
K-Map solution from FUNCTION<br />
SOP
POS