Escolar Documentos
Profissional Documentos
Cultura Documentos
Implementation
VDD
VDD
A
B
A&B
A+B
a ~& b
a ~| b
1
0
~a
a&b
a|b
a^b
a ~^ b
Y = ~A
A
Y=(A|B)
A
B
Y = ~( A & B )
A
B
Y=~(A|B)
Y=(A&B)
B
A
Y=(A^B)
B
A
B
Y=~(A^B)
Combinational Logic
z1
z2
xn
zm
Z( t ) = F( X( t))
Combinational-Circuit Building
Blocks
Multiplexers
Decoders
Encoders
Code Converters
Comparators
Adders/Subtractors
Multipliers
Shifters
Multiplexer
w0
s
w0
w1
w1
(c) Sum-of-products circuit
w0
w1
f = s' w0 + sw1
4 To 1 Mux
S0
S1
D0
D1
D2
D3
m0
m1
m2
m3
m4
m5
m6
m7
X
0
0
0
0
1
1
1
1
Y
0
0
1
1
0
0
1
1
Z
0
1
0
1
0
1
0
1
F
0
1
1
0
0
0
1
1
X
Y
Z
0
1
S0
S1
D0
D1
D2
D3
F = m1 + m2 + m6 + m7
s1 s0
00
01
10
11
0
0
1
1
0
1
0
1
f
w0
w1
w2
w3
s0
w0
s1
w1
f
w3
(c) Circuit
s1
w0
s1
w3
s0
w0
w1
w4
s2
s3
w7
0
1
w2
w3
f
w8
w11
w12
w15
w2
w1
0
1
1
0
w1
w2
w2
w1
w2
f
(c) Circuit
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
0
0
1
0
1
1
1
w1 w2
0
0
1
1
0
1
0
1
0
w3
w3
w2
w1
1
0
w3
1
(b) Circuit
Demultiplexers
Y
D0
S0
D1
D2
D3
S1
The data input Y has a path to all four outputs, but the input
information is directed to only one of the outputs, as specified
by the two selection lines S1 and S0
The demultiplexer circuit shows that it is identical to a 2 to 4
line decoder with enable input, with F as the enable input
Although the two circuits have different applications, their
logic diagrams are exactly the same. For this reason, a
decoder with enable input is referred to as a
decoder/demultiplexer
Half Adder
X
Half
Adder
C = X.Y
S = X'.Y + X.Y' = XY
(X + Y)
X
Y
X
0
0
1
1
Y
0
1
0
1
C
0
0
0
1
S
0
1
1
0
Full Adder
Module
Truth table
X
Y
(XY)
S
(XY)
C
Z
C = X.Y + (XY).Z
S = (XY)Z
N bits Adder
Y4 X4
Y3 X3
C4
C5
FA
S4
Y2 X2
C3
FA
S3
Y1 X1
C2
FA
S2
Input
Output
FA
S1
C1
Cout
4-bit
parallel adder
Cin
S4 S3 S2 S1
Analysis:
If S=1, then
X + (1's complement of Y) +1
appears as the result.
If S=0, then X+Y appears as
the result.
Comparators
Let A = A3A2A1A0 , B = B3B2B1B0; xi = Ai.Bi + Ai'.Bi'
A3
x3
A3.B3'
B3
A2
A3'.B3
A3'.B3 + x3.A2'.B2
x2
+ x3.x2.A1'.B1
+ x3. x2.x1.A0'.B0
B2
(A < B)
A1
x1
A3.B3' + x3.A2.B2'
B1
+ x3.x2.A1.B1'
+ x3. x2.x1.A0.B0'
A0
x0
(A > B)
B0
(A = B)
x3. x2.x1.x0
w0
n
inputs
Enable
2
outputs
En
y2n 1
y1 = w n 1'...w1' w0En
y0
wn 1
n 1
y 2 = w n 1'...w1w0' En
...
y 2n 1 = w n 1...w1w0En
0
0
1
1
x
0
1
0
1
x
1
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
1
0
w0
y0
w1
y1
y2
y0
y1
y2
y3
y3
En
(c) Logic circuit
En
w0
w1
En
w0
w1
En
y0
y1
y2
y3
y0
y1
y2
y3
y0
y1
y2
y3
y4
y5
y6
y7
w0
w1
En
w0
w1
w2
w3
w0
w1
En
En
y0
y1
y2
y3
En
w0
w1
En
w0
w1
En
y0
y1
y2
y3
y0
y1
y2
y3
y0
y1
y2
y3
y4
y5
y6
y7
y0
y1
y2
y3
y8
y9
y10
y11
y0
y1
y2
y3
y12
y13
y14
y15
Encoders
Opposite of decoders
Encode given information into a more compact form
Binary encoders
2n inputs into n-bit code
Exactly one of the input signals should have a value of 1,
and outputs present the binary number that identifies which input is equal to 1
Use: reduce the number of bits (transmitting and storing information)
w0
y0
n
n
outputs
2
inputs
w
2n 1
yn 1
0
0
1
0
0
1
0
0
1
0
0
0
y1 y0
0
0
1
1
0
1
0
1
w0
w1
y0
w2
y1
w3
Priority Encoders
w3 w2 w1 w0
0
0
0
0
1
0
0
0
1
x
0
0
1
x
x
0
1
x
x
x
y1 y0
d
0
0
1
1
0
1
1
1
1
d
0
1
0
1
Code Converters
w0
w1
w2
w3
a
b
c
d
e
f
g
a
f
e
b
g
d
(b) 7-segment display
0
0
0
0
0
0
0
0
1
1
0
0
0
0
1
1
1
1
0
0
0
0
1
1
0
0
1
1
0
0
0
1
0
1
0
1
0
1
0
1
1
0
1
1
0
1
1
1
1
1
1
1
1
1
1
0
0
1
1
1
1
1
0
1
1
1
1
1
1
1
1
0
1
1
0
1
1
0
1
1
1
0
1
0
0
0
1
0
1
0
1
0
0
0
1
1
1
0
1
1
0
0
1
1
1
1
1
0
1
1
Sequential Circuits
"data"
"load"
"stored value"
General CircuitM
inputs
::
Combinational
Logic
::
outputs
Memory
Clocks
period
Edge-Triggered Flip-Flops
Positive edge-triggered
CLK
Qpos
Qpos'
Qneg
Qneg'
positive edge-triggered FF
negative edge-triggered FF
CLK
Qedge
D Q
G
Qlatch
CLK
transparent
(level-sensitive)
latch
Timing Methodologies
Definition of terms
clock: periodic event, causes state of memory element to change;
can be rising or falling edge, or high or low level
setup time: minimum time before the clocking event by which the
input must be stable (Tsu)
hold time: minimum time after the clocking event until which the
input must remain stable (Th)
Tsu Th
data
D Q
input
clock
there is a timing "window"
around the clocking event
during which the input must
remain stable and unchanged
in order to be recognized
clock
stable changing
data
clock
D Q
CLK
Tsu Th
20ns 5ns
Tsu
20ns
Th
5ns
Tw 25ns
Tplh
25ns
13ns
Tphl
40ns
25ns
all measurements are made from the clocking event that is,
the rising edge of the clock
Synchronous vs.
Asynchronous Designs
Latches
S
E
Q
0
1
1
1
1
1
0
0
1
1
0
1
0
0
1
1
1 (forbidden)
1
1
0
1
0
1
0
0
no change
Flip Flops
D
Clk
S
C
R
CLK
CLK
CLK
E
S
C
R
1
1
0
1
0
1
0
0
no change
Flip Flops
J
0
0
1
1
D
0
1
K
0
1
0
1
JK Flip-Flop
Q+
Operation
Q
no change
0
Reset
1
Set
Q
Complement
D Flip-Flop
Q+
Operation
0
Reset
1
Set
S
0
0
1
1
SR Flip-Flop
R
Q+
0
Q
1
0
0
1
1
?
T
0
1
SR Flip-Flop
Q+
Operation
Q
no change
Q
Complement
Operation
no change
Reset
Set
Undefined
DQ
D0
Q0
DQ
D1
Q1
DQ
D2
Q2
DQ
D3
Clock
Q3
Shift registers
SERIN
CLOCK
SEROUT
D0
0
1
2
3
D Q
Q0/Sup
0
1
2
3
D Q
Q1
0
1
2
3
D Q
Q2
0
1
2
3
D Q
Q3/SDW
S0
S1
D1
S0
S1
S2
S0
S1
S3
S1
0 0
1 0
2 1
3 1
S2
0
1
0
1
Operation
No change
Shift down
Shift up
Parallel load
Ring Counters
Johnson Counter
Binary Counters