Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Combinational Logic
Two digital circuit types
Combinational digital circuits:
Consist of logic gates
Their current outputs are determined from the present
combination of inputs.
Their operations can be specified logically by sets of
Boolean functions.
Sequential digital circuits:
Employ storage elements in addition to logic gates.
Their outputs are a function of the inputs and the state
of the storage elements.
Their outputs depend on current inputs and past input.
They have feedback connections.
Digital System Design June 27, 2019 2
Combinational circuits
2n possible combinations of input values
Specific functions
Adders, subtractors, comparators, decoders, encoders,
and multiplexers
MSI circuits or standard cells
0 0 0 0 Tank level is OK
0 1 1 0 Low level, pump more in
1 0 0 1 High level, drain some out
1 1 x x inputs cannot occur
HI Pump
Schematic
Representation
Drain
LO
F=(T2T3)’
T3=(yT1)’
Substitution:
F = (T2T3)’ = ((xT1)’(yT1)’)’ = (xT1)+(yT1) = x(xy)’+y(xy)’=
=(x(x’+y’)) + (y(x’+y’)) = xx’+xy’+yx’+yy’ = xy’+yx’ = x y
Digital System Design June 27, 2019 7
Example (1/3)
What are the output functions F1 and F2?
A full-adder
F1: the sum
F2: the carry
Simplify:
F1 = T3+T2 = F2’T1+ABC
= (AB+AC+BC)'(A+B+C)+ABC
= (A'+B')(A'+C')(B'+C')(A+B+C)+ABC
= (A'+B'C')(AB'+AC'+BC'+B'C)+ABC
= A'BC'+A'B'C+AB'C'+ABC
C
Full
Z
Adder
Subscript i: 3 2 1 0
Input carry 0 1 1 0 Ci
Augend 1 0 1 1 Ai
Addend 0 0 1 1 Bi
Sum 1 1 1 0 Si
Carry 0 0 1 1 Ci+1
X = X3 X2 X1 X0
Y = Y3 Y2 Y1 Y0 4-bit
producing the sum S = S3 S2 S1 S0, C4 Cout Adder Cin C0 =0
X3 Y3 X2 Y2 X1 Y1 X0 Y0
Full
C4 Cout Cin C3 Cout Full Cin C2 Cout Full Cin C1 Cout Full Cin C0 =0
Adder Adder Adder Adder
S3 S2 S1 S0
Sum output
Digital System Design June 27, 2019 29
Larger Adders
Example: 16-bit adder using 4, 4-bit adders
Adds two 16-bit inputs X (bits X0 to X15), Y (bits Y0 to Y15) producing
a 16-bit Sum S (bits S0 to S15) and a carry out C16 from most
significant position.
Data inputs to be added X (X0 to X15) , Y (Y0 to Y15)
X3 X2 X1 X0 Y3 Y2 Y1 Y0 X3 X2 X1 X0 Y3 Y2 Y1 Y0 X3 X2 X1 X0 Y3 Y2 Y1 Y0 X3 X2 X1 X0 Y3 Y2 Y1 Y0
S3 S2 S1 S0 S3 S2 S1 S0 S3 S2 S1 S0 S3 S2 S1 S0
+6 0 -6 1 010
110 -7 1 001
+7 0 ---------------------
111 -13 1 0 011
---------------------
Result+13
would be 0 1correct
101 with extra position
Detected by XOR gate ( output =1 when inputs differ)
Can be used as input carry for next adder circuit
2 3 -2 -3 2 -2
3 6 -3 -6 -4 4
5 -7 -5 7 -2 2
OFL OFL
P7 P6 P5 P4 P3 P2 P1 P0
x y z C S
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
O3 = E S2 S1 S0
2:4 Decoder:
O4 = E S2 S1 S0
O0 = E S1 S0
O5 = E S2 S1 S0
1:2 Decoder: O1 = E S1 S0
O0 = E S; O1 = E S O6 = E S2 S1 S0
O2 = E S1 S0
O7 = E S2 S1 S0
O3 = E S1 S0
1:2 Decoder, Active High Enable 1:2 Decoder, Active Low Enable
Alternative Implementations
E E
Output0 Output0
Output1 Output1
Output2 Output2
Output3 Output3
2:4 Decoder, Active High Enable 2:4 Decoder, Active Low Enable
D0
D1 X = D4 + D5 + D 6 + D 7
D2
D3 Y = D 2 + D3 + D 6 + D 7
D4
D5
D6
D7 Z = D 1 + D3 + D 5 + D 7
x = D2 + D3
y = D3 + D1 D2’
V = D0 + D1 + D2 + D3
Inputs Inputs
I0 0 I0
I1 4:1
1 MUX I1
I2 Y Output I2 mux Y
2
I3
3S S I3
1 0
S1 S0
select
select
I0
I1
Y
I2
I3
0 1 2 3
2-to-4
Decoder
S1 S0
I0
I1
S2 S1 S0 Y
4:1
I2 MUX 0 0 0 I0
I3 0 0 1 I1
2:1 0 1 0 I2
S1 S0 MUX Y 0 1 1 I3
I4 1 0 0 I4
I5 4:1 1 0 1 I5
I6 MUX 1 1 0 I6
S2
I7 1 1 1 I7
S1 S0
2X4
Select Decoder
s bits b bits lines One of
Demux One of n outputs
Select four 1-bit
One of n b bits outputs
Data
Data Sources
Input . Input Enable
selected data (1bit)
.
b bits
1-bit 4-output demultiplexer using
a 2x4 binary decoder.
Digital System Design June 27, 2019 79
1-to-4 Demultiplexer
Outputs
Y0 = D.S1'.S0' S1 So Y0 Y1 Y2 Y3
0 0 D 0 0 0
Y1 = D.S1'.S0
Data D demux
0 1 0 D 0 0
Y2 = D.S1.S0' 1 0 0 0 D 0
Y3 = D.S1.S0
1 1 0 0 0 D
S1 S0
select
Y0 = D.S1'.S0'
2x4
S1 Decoder Y1 = D.S1'.S0
S0 Y2 = D.S1.S0'
E Y3 = D.S1.S0
Three state:
0 or 1 Boolean value
“High impedance”, Z state
High impedance acts as if gate were disconnected