Sie sind auf Seite 1von 29

LOGIC GATES AND BOOLEAN FUNCTIONS

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
Logic Gates
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).
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 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.
LOGIC GATES
NOT (Inverter)
x NOT

x x 0 1

1 0

x Buffer
Buffer
0 0
x x
1 1
x y AND
AND 0 0 0
x xy 0 1 0
y 1 0 0
1 1 1
NAND (Not AND)
x y NAND
0 0 1
x xy 0 1 1
y 1 0 1
1 1 0
OR x y OR
0 0 0
x x+y 0 1 1
y 1 0 1
1 1 1

NOR (Not OR)


x y NOR
x 0 0 1
x+y 0 1 0
y
1 0 0
1 1 0
XOR (Exclusive-OR) x y XOR
0 0 0
x x y 0 1 1
y xy+xy 1 0 1
1 1 0

XNOR (Exclusive-NOR)
(Equivalence)
x y XNOR
0 0 1
x x y xy+xy 0 1 0
y x y 1 0 0
1 1 1
Type of IC logic gate
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.
Boolean Function Simplification
Commutative Law
xy=yx
x+y=y+x

Associative law
(xy)z=x(yz)
(x+y)+z=x+(y+z)

Distributive law
x(y+z)=(xy)+(xz)
x+(yz)=(x+y)(x+z)
Rules of Boolean Algebra
1. A + 0 = A 7. A . A = A
2. A + 1 = 1 8. A . A = 0
=
3. A . 0 = 0 9. A = A
4. A . 1 = A 10. A + AB = A
5. A + A = A 11. A + AB = A + B
6. A + A = 1 12. (A + B)(A + C) = A + BC
DeMorgans Theorem
DeMorgans 1st Theorem
The complement of a product of variables is
equal to the sum of the complemented variables.
AB = A + B
Applying DeMorgans first theorem to gates:
A A
AB A+B Inputs Output
B B
A B AB A + B
NAND Negative-OR 0 0 1 1
0 1 1 1
1 0 1 1
1 1 0 0
DeMorgans Theorem
DeMorgans 2nd Theorem
The complement of a sum of variables is equal to
the product of the complemented variables.
A+B=A.B
Applying DeMorgans second theorem to gates:
A A Inputs Output
A+B AB
B B
A B A + B AB
NOR Negative-AND 0 0 1 1
0 1 0 0
1 0 0 0
1 1 0 0
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)
Example
Using boolean algebra techniques, simplify this
expression:
AB + A(B + C) + B(B + C)

AB + AB + AC + BB + BC
AB + AB + AC + B + BC
AB + AC + B + BC
AB + AC + B
B + AC
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 &
Maxterm

Boolean
Expression

Sum of Product Product of Sum


(SOP) (POS)
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
B=0 (0) (0) (0) 4 1 0 0 m4 ABC
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
B=1 (1) + (1) + (1) 4 1 0 0 M4 A B C
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 ABC ABC ABC 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 ABC ABC ABC 0 0 0 0 0 1
1 0 0 1 1 0
F m1 m4 m5 m7
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 ABC 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 ABC 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)
SOP Form
Consist of product (boolean multiplication) of literal
(variable or complement)
Two or more product term are summed by boolean
addition

AB + ABC
ABC + CDE + BCD

SOP expreesion can have the term A B C but not ABC


Implementation SOP Form
Domain of a general boolean expression is the set of
variable contained in the expression
Example:
Domain of the expression AB + ABC is a set of variable
A,B,C
B
C
F BC AB AC A
F
B
A
C
Standard SOP Form

POS Form

Implementation POS Form


simply required anding the output of two or more gate

A
C
A
F ( A C)( A B)( B C) B F
B
C
Standard POS Form

Exercise
Given the Boolean function
F = xyz + xyz + wxy + wxy + 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).

Das könnte Ihnen auch gefallen