Anda di halaman 1dari 33

TOPIC 3

BOOLEAN OPERATIONS
• A logic gate performs a logical operation
on one or more logic inputs and produces
a single logic output and most commonly
found at digital circuits
AND Gate
• Logic Symbol and Truth Table

X Y Z  X Y
0 0 0
0 1 0
1 0 0
1 1 1
OR Gate
• Logic Symbol and Truth Table

X Y Z  X Y
0 0 0
0 1 1
1 0 1
1 1 1
Inverter/Not Gate
• Logic Symbol and Truth Table

Logic Symbol

Logic Expression

X ZX
0 1 Truth Table

1 0
NOR
• Logic Symbol and Truth Table

X
Z  X Y
Y

X Y Z  X Y
0 0 1
0 1 0
1 0 0
1 1 0
NAND
• Logic Symbol and Truth Table

X
Z  X Y
Y

X Y Z  X Y
0 0 1
0 1 1
1 0 1
1 1 0
XOR
• Logic Symbol and Truth Table
X
Z  X Y
Y

X Y Z  X Y
0 0 0
0 1 1
1 0 1
1 1 0

Result is ‘1’ when exactly one input is ‘1’


XNOR
• Logic Symbol and Truth Table
X
Z  X Y
Y

X Y Z  X Y
0 0 1
0 1 0
1 0 0
1 1 1

Result is ‘1’ when both inputs are the same logic


COMBINATIONAL LOGIC CIRCUIT

• To design combinational logic circuit, we


need to know about basic logic equation :

– If sign “+” between two or more variables, it


means all variables using OR gate. For
example : A + B + C
– If sign “.” between two or more variables, it
means all variables using AND gate
operation. For example : A.B.C
Example :
• Given logic equation Y = A . B + A . B. Draw the logic
diagram base on the equation.
Solution
• the equation has 2 variables A and B.
• reference A . B used AND gate and A used NOT gate
• reference A . B used AND gate
• Finally, both reference used OR gate to form equation of
Y
Boolean Theorem
• Basic Rules

1. A + 0 = A 7. A . A = A
2. A + 1 = 1 8. A . A = 0
3. A + A = A =
9. A = A
4. A + A = 1 10. A + AB = A
5. A . 0 = 0
11. A + AB = A + B
6. A . 1 = 1
12. (A + B)(A + C) = A + BC
Boolean Simplification -
Example
• Using Boolean theorem, Simplify the
expression:
AB  A( B  C )  B( B  C )
• Apply distributive law,
AB  AB  AC  BB  BC
• Apply rule 7 (BB = B), and rule 5 (AB + AB = AB)
AB  AC  B  BC
• Apply rule 10 (B + BC = B)
AB  AC  B
Boolean Simplification -
Example
AB  AC  B
• Apply rule 10 (AB + B = B)
B  AC
At this point, the expression is simplified as much
as possible

Original expression is AB  A( B  C )  B ( B  C )
Which is logically equal to B  AC
In terms of design, what is the advantage of
Boolean simplification?
Boolean Simplification -
Example
Original expression is AB  A( B  C )  B ( B  C )
A

B
C

Which is logically equal to B  AC Faster


Compact design
B Lower cost

A
C
DeMorgan’s Theorem
• The complement of a product of variables
is equal to the sum of the complemented
variables
A B A B A B
Theorem 1
0 0 1 1
AB = A + B
0 1 1 1
A A
1 0 1 1
AB A+B
B B 1 1 0 0
NAND Negative-OR
DeMorgan’s Theorem

Theorem 2 A B A B A B
A+B=A.B 0 0 1 1
0 1 0 0
A A
B
A+B
B
AB 1 0 0 0
NOR Negative-AND 1 1 0 0
Example 1:
• Given Z = A + B . C .Simplified the equation
below using De’ Morgan Theorem.
Solution;
Z = A + B.C
= A . B.C
= A .( B+C)
= A . (B+C)
Example 2:
• Given Z = (A + C).(B+D) .Simplified the
equation below using De’ Morgan Theorem.
Solution :
Z = (A + C) . (B + D)
= (A + C) + (B + D)
= (A . C) + (B . D)
= AC + BD
Sum-of-Products
• SOP expressions consist of two or more AND
terms (products) that are ORed together
• In SOP an inversion cannot cover more than
one variable in a term
Example:
• ABC + ABC
• AB+AB +AB
• ABC+ ABC
• AB +ABC+CD +C
Product-of-Sums
• POS expressions consist of two or more
OR terms (sums) that are ANDed together
• Example:
– X = (A + B + C)(A + C)
– X = (A + B)(C + D)F
–X = (A+B).(B+C)
–X = (B+C+D).(BC+E)
– X = ( A + C ) . ( B + E ). ( C + B )
Karnaugh Map Method
• A graphical method of simplifying logic
equations or truth tables.
• Also called a K map.
• Theoretically can be used for any number
of input variables, but practically limited to
5 or 6 variables.
Karnaugh Map Method
• The truth table values are placed in the K
map.
• Adjacent K map square differ in only one
variable both horizontally and vertically.
• The pattern from top to bottom and left to
right must be in the form
• A SOP expression can be obtained by
ORing all squares that contain a 1.
Karnaugh Map Method
• Looping adjacent groups of 2, 4, or 8 1s will
result in further simplification.
• When the largest possible groups have been
looped, only the common terms are placed in the
final expression.
• Looping may also be wrapped between top,
bottom, and sides.
• Looping a pair (or quad or octet and so on) of
adjacent 1s in a K map eliminates the variable
that appears in complemented and
uncomplemented form.
Karnaugh maps and truth tables for (a) two, (b) three,
and (c) four variables.
Examples of looping pairs of adjacent 1s.
Examples of looping groups of fours 1s (quads).
Examples of looping groups of eight 1s (octets).
Karnaugh Map Method
• Complete K map simplification process
– Construct the K map, place 1s as indicated in the truth
table.
– Loop 1s that are not adjacent to any other 1s. (Isolated 1s)
– Loop 1s that are in pairs
– Loop 1s in octets even if they have already been looped.
– Loop quads that have one or more 1s not already looped.
(Use minimum number of loops)
– Loop any pairs necessary to include 1s not already
looped.
– Form the OR sum of terms generated by each loop.
Examples :
Example : The same K map with two equally good
solutions.
Example :
• Use a K map to simplify:
Y = C(ABD + D) + ABC + D
SOLUTION :

Anda mungkin juga menyukai