Introduction of Logic Circuits
Introduction of Logic Circuits
http://dreamcatcher.asia/cw
Copyright 2008 Prof. Stephen Brown.
ACKNOWLEDGEMENT
$100 $40
wafer
chip
package
S = switch
(transistor)
We use the word logic is because all signals (x, L) can have
only two values: 0, 1. The 0 represents logic FALSE, and 1
represents logic TRUE. Classic Mathematics also calls this
Boolean Logic, named after George Boole.
x1 x2
L( x1 , x2 ) = x1 OR x2
= x1 x2
= x1 AND x2
= x1 x2
R = limits
the current
that flows.
if x = 0, L = 1
x = 1, L = 0
You will see that all logic circuitry can be specified using only
AND, OR, NOT.
Truth table: a way of specifying logic functions.
x1 x2 x1 x2 x1 x2 x1 + x2
0 0 0 0 0 0
0 1 0 0 1 1
1 0 0 1 0 1
1 1 1 1 1 1
f = x3 + x1 x 2
x1
x2 f = x1 + x2 OR gate
x1
x2
f = x1 + x2 + ...+ xn
xn
x f =x NOT gate
f = x +xx3 1 2
xy
Note: =
Sensors
f = reject gum
3 sensors
S3: generates 1 iff gum is too large
S2: generates 1 iff gum is too small
S1: generates 1 iff gum is too light
Requirement: Set f=1 (reject) iff a gum ball is too
large, or both too small and too light.
S3
S2
S1
By inspection:
f = S3 + S 2 S1
S2
S1
S3
S1
S3
1
S2
Boolean Algebra
This algebra is useful for simplifying (optimizing) logic
functions. It consists of axioms, rules, and identities.
12 . x ( y + z ) = xy + xz (distributi ve )
x + ( y z) = ( x + y) ( x + z)
Note: does not work with non-Boolean Algebra
Same!
Copyright 2008 Prof. Stephen Brown. 25
Distributive Identity (2/3)
Proof by Venn Diagram
Circle to represent variable
x
x y
x+y
x
x.y
+ .
=
=
Same!
x + xy Rule
= x(1 + y ) 12
. = = x(1) 5
=x 6
14 . xy + x y = x ( combining) xy + xy
( x + y )( x + y ) = x = x( y + y ) 12
= x(1) 8
=x 5
Copyright 2008 Prof. Stephen Brown. 28
Boolean Algebra (5/5)
15 . xy = x + y DeMorgans
x + y = x y theorem
16 . x + xy = x + y
x (x + y) = x y x ( x + y)
= ( x x ) + ( x y ) 12
+ = = 0 + ( x y) 8
x y
Copyright 2008 Prof. Stephen Brown. 29
Example of Algebraic Minimization
x y z f
1
0 0 0 1
0 0 1 1 2 f =1 x yz + 2 x yz + 3 x yz + 4 x yz + 5 xyz + 6 xyz
0 1 0 1 3
= x y ( z + z )12 + x y ( z + z )12 + xy ( z + z )12
0 1 1 1 4
= x y (1) + x y (1) + xy (1)
1 0 0 0 = x y + x y + xy
1 0 1 0
5
= x 14 + xy
1 1 0 1
1 1 1 1 6 = x + y16
h= xx +xx +xx
1 3 2 3 1 2
= xx +x 1 2 3
Expressions like:
g = xxx +xxx +xxx +xxx +xxx
1 2 3 1 2 3 1 2 3 1 2 3 1 2 3
0 0 1 xxx
1 2 3
m 1
0 1 0
0 1 1
. . .
. . .
1 0 0
1 0 1
1 1 0
1 1 1 xxx
1 2 3
m 7
0 0 0 0 (x + x + x ) 1 2 3
1 2 3
0 0 1 1
0 1 0 1
0 1 1 0 (x + x + x )
1 2 3
1 0 0 1
1 0 1 0 (x + x + x )
1 2 3
1 1 0 0 (x + x + x )
1 2 3
1 1 1 1
xx x
1 2 3
Maxterm Label
0 0 0 x +x +x M
x +x +x
1 2 3 0
0 0 1 1 2 3
M 1
0 1 0
0 1 1 . . .
. . .
1 0 0
1 0 1
1 1 0
1 1 1 x +x +x
1 2 3 M 7
0 0 0 0
0 0 1 1 or
0 1 0 1
0 1 1 0 f = M (0,3,5,6)
1 0 0 1
1 0 1 0 f ( x , x , x ) = M (0,3,5,6)
1 2 3
1 1 0 0
1 1 1 1
0 0 1 1
(x + x + x )
1 2 3 1 2 3
0 1 0 0
= (x + x ) + (x x )
1 2 3
0 1 1 1 1 3 2 2
1 0 0 0 (x + x + x )
1 0 1 1
1 2 3
=x +x 1 3
1 1 0 1
1 1 1 1
(
f = ( x1 + x3 ) x1 + x2 + x3 )
xy f f
00 0 x y 1 f = x y + xy + xy
01 1 x y 0
10 1 xy 0 = y ( x + x) + x( y + y )
11 1 xy 0
= x+ y
But we could also implement f
f = xy f = f = xy = x + y (DeMorgans Theorem)
f = xy ; f = f = xy = x + y
f = x y + xy + xy = y ( x + x) + x( y + y ) = y + x
s x1 x2 f
0 0 0 0
0 0 1 0
f = s x + sx
0 1 0 1 sx x + sx x 1 2
s
1 2 1 2
0 1 1 1
1 0 0 0 = sx (x + x ) = sx
1 2 2 1
x 1
1 0 1 1
1 1 0 0
sx 2 f
1 1 1 1 x 2
x2 1
f
Using switches
s x s
1
or x 1
f
s x s
2
x 2
0 0 0
f = s x + sx
1
0 1 1
s
1 1
1 0 1
x 2
1 1 0
= sx 1
= s XOR x 1
f = x1 x2 + x2 x3 = x1 x2 + x2 x3
= ( x1 x2 ) ( x2 x3 ) * DeMorgan
f = ( x1 x2 ) ( x2 x3 )
f = ( x1 + x2 ) ( x2 + x3 )
= ( x1 + x2 ) ( x2 + x3 )
= ( x1 + x2 ) + ( x2 + x3 ) *NOR
= ( x1 x2 ) ( x2 x3 )
pins
Mini printed
circuit board
(pcb)
http://dreamcatcher.asia/cw
Copyright 2008 Prof. Stephen Brown.