Sunteți pe pagina 1din 3

Lecture 14 Logic Gates

Today we will A A
 Learn how to implement mathematical logical functions AND C=A·B NAND C =A⋅B
B B
using logic gate circuitry, using
 Sum-of-products formulation
A
 NAND-NAND formulation A NOR A +B
OR C=A+B B
B
 Learn how to simplify implementation using

 Boolean algebra
A
 Karnaugh maps A NOT A XOR C= A⊕B
B

(EXCLUSIVE OR)

Properties of Logic Functions Properties of Logic Functions

 These new functions, AND, OR, etc., are mathematical A+0=A A•1=A
functions just like +, -, sin(), etc. A+A=1 A•A=0
 The logic functions are only defined for the domain A+A=A A•A=A
{0, 1} (logic functions can only have 0 or 1 as inputs). A+B=B+A A•B=B•A
 The logic functions have range {0, 1} (logic functions A + (B + C) = (A + B) + C (A • B) • C = A • (B • C)
can only have 0 or 1 as outputs)
A • (B + C) = A • B + A • C A + B • C = (A + B) • (A + C)
 AND acts a lot like multiplication.
A+A•B=A A • (A + B) = A
 OR acts a lot like addition.
DeMorgan’s Law: A•B=A+B
 Learn the properties so you can simplify equations!
A•B=A+B
A•B=A+B
De Morgan’s Law Logical Synthesis
A•B=A+B

A A +B  Suppose we are given a truth table or Boolean


A A⋅B = expression defining a mathematical logic function.
B  Is there a method to implement the logical function
B
using basic logic gates?
 One way that always works is the “sum of products”
formulation. It may not always be the best
A A +B A⋅B implementation for a particular purpose, but it works.
A
B =
B

Sum-of-Products Method Sum-of-Products Method


1. Create a Boolean expression for the function in sum-of- 2. Implement sum-of-products expression with one stage
products form. of inverters, one stage of ANDs, and one big OR:
This means represent the function F by groups of ANDed inputs
A
(products) that are then ORed together (sum of products).
B F
F = A·B·C + A·B·D is in sum-of-products form
C
F = A·B·(C + D) is not in sum-of-products form
A
 How to get to sum-of-products form?
 Use properties to manipulate given Boolean equation B
F = A·B·C + A·B·D
 Look at each “1” in truth table, write product of inputs that D
creates this “1”, OR them all together
Example (Adder) NAND-NAND Implementation
S1 using sum-of-products:
A B C S1 S0  We can easily turn our sum-of-products circuit into one
0 0 0 0 0 1) Find where S1 is “1” that is made up solely of NANDs (generally cheaper):
0 0 1 0 1 A
2) Write down product of inputs
0 1 0 0 1 which create each “1” F
B
0 1 1 1 0 ABC ABC
1 0 0 0 1 C
ABC ABC
1 0 1 1 0 A
3) Sum all products
1 1 0 1 0
B
1 1 1 1 1 ABC+ ABC+ ABC+ ABC
4) Draw circuit D
Input Output

Karnaugh Maps Example (Adder)


Simplification for S1:
To find a simpler sum-of-products expression,
Write the truth table of your circuit into a special table. A B C S1 S0 BC
CD
00 01 11 10 0 0 0 0 0 00 01 11 10
B BC
00 01 11 10 00 0 0 1 0 1 0 0 0 1 0
0 1 A
0 0 01 0 1 0 0 1 1 0 1 1 1
A A AB
1 1 11 0 1 1 1 0
10 1 0 0 0 1
2 Inputs 3 Inputs
4 Inputs 1 0 1 1 0
For each “1”, circle the biggest 2m by 2n block of “1’s” that includes 1 1 0 1 0
that particular “1”.
1 1 1 1 1
Write the product that corresponds to that block, and finally sum.
Input Output

S-ar putea să vă placă și