4b Digital System - Logic Gates & Boolean Expression

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 52

LOGIC GATES AND BOOLEAN FUNCTIONS

Summary
Exercise
Given the Boolean function
F = xy’z + x’y’z + w’xy + wx’y + wxy
(a) Obtain the truth table of the function.
(b) Draw the logic diagram using the original Boolean
expression.
(c) Simplify the function to a minimum number of literals
using Boolean algebra.
(d) Obtain the truth table of the function from the
simplified expression and show that it is the same as
the one in part (a)
(e) Draw the logic diagram from the simplified expression
and compare the total number of gates with the
diagram of part (b).
Boolean Function
Boolean Expression x y z F
Example: F = x + y’ z 0 0 0 0
Truth Table 0 0 1 1
All possible combinations 0 1 0 0
of input variables
0 1 1 0
Logic Circuit
1 0 0 1
x F 1 0 1 1
y
z 1 1 0 1
1 1 1 1
Begin
LOGIC GATES AND BOOLEAN
ALGEBRA
Digital circuits
hardware components that manipulate binary information
implemented using transistors and interconnections in IC
each basic circuit is called logic gate
 performs a specific logical operation
A logic gate is an elementary building block of a digital circuit
Most logic gates have two inputs and one output
At any given moment, every terminal is in one of the two binary
conditions low (0) or high (1) represented by different voltage
levels
In most logic gates, the low state is approximately zero volts
(0V)
The high state is approximately five volts positive (+5 V).
Boolean Algebra
Boolean algebra is a mathematical system for the
manipulation of variables that can have one of two
values.
In formal logic, these values are “true” and “false.”
In digital systems, these values are “on” and “off,” 1 and
0, or “high” and “low.”
Boolean expressions are created by performing
operations on Boolean variables.
Common Boolean operators include AND, OR, and
NOT.
A Boolean operator can be completely described
using a truth table.
TRUTH TABLE
A truth table shows how a logic circuit's output responds to
various combinations of the inputs
Using logic 1 for true and logic 0 for false.
All permutations of the inputs are listed on the left
Output of the circuit is listed on the right
The desired output can be achieved by a combination of logic
gates
A truth table for two inputs is shown, but it can be extended to
any number of inputs.
The input columns are usually constructed in the order of
binary counting with a number of bits equal to the number of
inputs.
TYPES OF GATE
Logic Gates
Gates can have multiple inputs and more than one
output.
A second output can be provided for the complement
of the operation.
Example
Answer
Boolean Function Simplification

Commutative Law
x•y=y•x x+y=y+x
Identity Element
x•1=x x+0=x
Complement
x • x’ = 0 x + x’ = 1
Boolean Algebra Theorems
Duality
The dual of a Boolean algebraic expression is obtained
by interchanging the AND and the OR operators and
replacing the 1’s by 0’s and the 0’s by 1’s.
 x•(y+z)=(x•y)+(x•z)
 x+(y•z)=(x+y)•(x+z)
Theorem 1
 x•x=x x+x=x
Theorem 2
 x•0=0 x+1=1
Theorem 3: Involution

 (x)=x

Theorem 4: Associative & Distributive


 (x•y)•z=x•(y•z)
( x + y ) + z = x + ( y + z )
 x•(y+z)=(x•y)+(x•z)
x+(y•z)=(x+y)•(x+z)

Theorem 5: DeMorgan

 (x•y) =x +y (x+y) = x•y

Theorem 6: Absorption
 x•(x+y)=x x+(x•y)=x
DeMorgan’s Theorem on Gates
AND Gate
F = x • y F = (x • y) F=x+y

OR Gate
F = x + y F = (x + y) F=x•y
Example

2
1

3
Answer
1 2

3
Example
Use Boolean Algebra to simplify Boolean functions to
produce simpler circuits

Example: Simplify to a minimum number of literals


F = x + x’ y ( 3 Literals)
= x + ( x’ y ) Distributive law (+ over •)
= ( x + x’ ) ( x + y )
=(1)(x+y)=x+y ( 2 Literals)
Standard Form
Sum of Products (SOP)
AB (C  C )
 AB (1)
F  A BC  ABC  ABC  ABC
 AB
AC ( B  B)
 AC
BC ( A  A)
 BC
F  BC ( A  A)  AB(C  C )  AC ( B  B)

F  BC  AB  AC
Product of Sums (POS)
AB (C  C )

F  A BC  ABC  ABC  ABC

BC ( A  A)

AC ( B  B )
F  AC ( B  B )  AB(C  C )  BC ( A  A)

F  AC  AB  BC
F  ( A  C )( A  B )( B  C )
Sum of Products (SOP) B’
C
A
F  BC  A B  AC B’ F
A
C

Product of Sums (POS) A


C
A
F  ( A  C )( A  B )( B  C ) B’ F
B’
C
Boolean Function
Boolean Expression x y z F
Example: F = x + y’ z 0 0 0 0
Truth Table 0 0 1 1
All possible combinations 0 1 0 0
of input variables
0 1 1 0
Logic Circuit
1 0 0 1
x F 1 0 1 1
y
z 1 1 0 1
1 1 1 1
Minterm
Product (AND function) A B C Minterm
Contains all variables 0 0 0 0 m0 ABC
Evaluates to ‘1’ for a 1 0 0 1 m1 ABC
specific combination
2 0 1 0 m2 ABC
Example
3 0 1 1 m3 ABC
A=0 A B C
4 1 0 0 m4 ABC
B=0 (0) • (0) • (0)
C=0 5 1 0 1 m5 ABC
1 • 1 •1=1 6 1 1 0 m6 ABC
7 1 1 1 m7 ABC
Maxterm
Sum (OR function) A B C Maxterm
Contains all variables 0 0 0 0 M0 A  B  C
Evaluates to ‘0’ for a 1 0 0 1 M1 A  B  C
specific combination
2 0 1 0 M2 A  B  C
Example
3 0 1 1 M3 A  B  C
A=1 A B C
4 1 0 0 M4 A  B  C
B=1 (1) + (1) + (1)
C=1 5 1 0 1 M5 A  B  C
0 + 0 + 0=0 6 1 1 0 M6 A  B  C
7 1 1 1 M7 A  B  C
Truth Table to Boolean Function
A B C F F  A BC  A BC  A BC  ABC
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 0
1 1 1 1
Sum of Minterms A B C F F
F  ABC  A BC  A BC  ABC 0 0 0 0 0 1

F  m1  m4  m5  m7 1 0 0 1 1 0
2 0 1 0 0 1
F   (1,4,5,7)
3 0 1 1 0 1
Product of Maxterms 4 1 0 0 1 0
F  A BC  ABC  ABC  ABC 5 1 0 1 1 0
F  ABC  ABC  ABC  ABC 6 1 1 0 0 1
7 1 1 1 1 0
F  A BC  ABC  ABC  ABC
F  ( A  B  C )( A  B  C )( A  B  C )( A  B  C )
F  M0 M2 M3 M6
F   (0,2,3,6)
Exercise
Exercise
Given the Boolean function
F = xy’z + x’y’z + w’xy + wx’y + wxy
(a) Obtain the truth table of the function.
(b) Draw the logic diagram using the original Boolean
expression.
(c) Simplify the function to a minimum number of literals
using Boolean algebra.
(d) Obtain the truth table of the function from the
simplified expression and show that it is the same as
the one in part (a)
(e) Draw the logic diagram from the simplified expression
and compare the total number of gates with the
diagram of part (b).
Boolean Function
Boolean Expression x y z F
Example: F = x + y’ z 0 0 0 0
Truth Table 0 0 1 1
All possible combinations 0 1 0 0
of input variables
0 1 1 0
Logic Circuit
1 0 0 1
x F 1 0 1 1
y
z 1 1 0 1
1 1 1 1

You might also like