Sunteți pe pagina 1din 8

9/16/2008

Types of Digital Logic


• Combinational Logic – Digital circuits
th t have
that h no memory. TheTh same inputs
i t
Digital Logic always produce the same output.
• Sequential Logic – Logic elements with
memory whose output depends on the
COMP375 Computer Architecture
input and the current contents of the
and
dOOrganization
i ti
memory.

Logic Gates Negative Logic Gates


AND *
NAND

OR +

NOR

NOT X

1
9/16/2008

Boolean Laws Boolean Laws


Identity X + 0 = X and X * 1 = X Distributive X * (Y + Z) = (X * Y) + (X * Z)
One X+1=1 X + (Y * Z) = (X + Y) * (X + Z)
Zero X*0=0
Inverse X + X = 1 and X * X = 0 DeMorgan’s X + Y = (X * Y)
Reflexive X + X = X and X * X = X
X * Y = (X + Y)
Commutative X + Y = Y + X and X*Y = Y*X
Associative X + (Y + Z) = (X + Y) + Z
X * (Y * Z) = (X * Y) * Z

Sum of Product Form Truth Table to Function


Sum of Product (A*B) + (C*D) A B C F
• A sum of products solution 0 0 0 1
can be written by ORing 0 0 1 0
Product of Sums (A+B) * (C + D) the lines of the truth table
0 1 0 0
that are true.
0 1 1 0
1 0 0 0
F = ABC + ABC + ABC 1 0 1 1
1 1 0 1
1 1 1 0

2
9/16/2008

Programmable Logic Array Sequential Logic


• Some logic circuits have memory that
d t
determines
i th
the future
f t outcome
t off the
th
• PLAs implement circuit.
the sum of • Flip-flops are a simple sequential logic
products elements.

SR Flip-Flops D Flip-Flop
• An SR flip-flop can • A D flip-flop has C D Qnext Comment
b constructed
be t t d from
f only
l one d data
t iinputt 0 X Qprev No change
two NOR gates plus enable, C 1 0 0 Reset
1 1 1 Set
S R Action
0 0 Keep state
0 1 Q=0
1 0 Q=1
Restricted
1 1
combination

3
9/16/2008

Logic Simplification Karnough maps


• It is frequently possible to simplify a logical CD CD CD CD
p
expression. This makes it easier to
understand and requires fewer gates to AB 0000 0001 0011 0010
implement.
AB 0100 0101 0111 0110
• There are several simplification techniques
including Boolean algebra and Karnough AB 1100 1101 1111 1110
maps.
AB 1000 1001 1011 1010

Single Variable Group of 8 Single Variable Group of 8


CD CD CD CD CD CD CD CD

AB 0000 0001 0011 0010 AB 0000 0001 0011 0010

AB 0100 0101 0111 0110 AB 0100 0101 0111 0110

AB 1100 1101 1111 1110 AB 1100 1101 1111 1110

AB 1000 1001 1011 1010 AB 1000 1001 1011 1010

4
9/16/2008

Single Variable Group of 8 Single Variable Group of 8


CD CD CD CD CD CD CD CD

AB 0000 0001 0011 0010 AB 0000 0001 0011 0010

AB 0100 0101 0111 0110 AB 0100 0101 0111 0110

AB 1100 1101 1111 1110 AB 1100 1101 1111 1110

AB 1000 1001 1011 1010 AB 1000 1001 1011 1010

Two Variable Group of 4 Two Variable Group of 4


CD CD CD CD CD CD CD CD

AB 0000 0001 0011 0010 AB 0000 0001 0011 0010

AB 0100 0101 0111 0110 AB 0100 0101 0111 0110

AB 1100 1101 1111 1110 AB 1100 1101 1111 1110

AB 1000 1001 1011 1010 AB 1000 1001 1011 1010

5
9/16/2008

Two Variable Group of 4 Two Variable Group of 4


CD CD CD CD CD CD CD CD

AB 0000 0001 0011 0010 AB 0000 0001 0011 0010

AB 0100 0101 0111 0110 AB 0100 0101 0111 0110

AB 1100 1101 1111 1110 AB 1100 1101 1111 1110

AB 1000 1001 1011 1010 AB 1000 1001 1011 1010

Two Variable Group of 4 Two Variable Group of 4


CD CD CD CD CD CD CD CD

AB 0000 0001 0011 0010 AB 0000 0001 0011 0010

AB 0100 0101 0111 0110 AB 0100 0101 0111 0110

AB 1100 1101 1111 1110 AB 1100 1101 1111 1110

AB 1000 1001 1011 1010 AB 1000 1001 1011 1010

6
9/16/2008

Three Variable Pairs Three Variable Pairs


CD CD CD CD CD CD CD CD

AB 0000 0001 0011 0010 AB 0000 0001 0011 0010

AB 0100 0101 0111 0110 AB 0100 0101 0111 0110

AB 1100 1101 1111 1110 AB 1100 1101 1111 1110

AB 1000 1001 1011 1010 AB 1000 1001 1011 1010

Three Variable Pairs Three Variable Pairs


CD CD CD CD CD CD CD CD

AB 0000 0001 0011 0010 AB 0000 0001 0011 0010

AB 0100 0101 0111 0110 AB 0100 0101 0111 0110

AB 1100 1101 1111 1110 AB 1100 1101 1111 1110

AB 1000 1001 1011 1010 AB 1000 1001 1011 1010

7
9/16/2008

Example 1 bit Subtraction Subtraction Karnough Maps


Diff = X - Y

Bin X Y Dif Bout XY XY XY XY


0 0 0 0 0 Bin 0 1 0 1
0 0 1 1 1
0 1 0 1 0 Bin 1 0 1 0
0 1 1 0 0
1 0 0 1 1
1 0 1 0 1 Dif = XYBin + XYBin + XYBin + XYBin
1 1 0 0 0
1 1 1 1 1

Subtraction Karnough Maps

XY XY XY XY

Bin 0 1 0 0

Bin 1 1 1 0

Bout = XBin + XY + YBin

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