Professional Documents
Culture Documents
Combinational Circuits: - Output Is Function of Input Only
Combinational Circuits: - Output Is Function of Input Only
Combinational
n inputs •
•
•
•
m outputs
• Circuits •
Ref: Mano, Morris M., Ciletti, Michael D. (2013) Digital Design 1 / 65
Combinational Circuits
• Analysis
• Given a circuit, find out its function ?
T2=ABC
T1=A+B+C
T3=AB'C'+A'BC'+A'B'C
F’2=(A’+B’)(A’+C’)(B’+C’)
F2=AB+AC+BC
F1=AB'C'+A'BC'+A'B'C+ABC
F2=AB+AC+BC
Ref: Mano, Morris M., Ciletti, Michael D. (2013) Digital Design 3 / 65
Analysis Procedure
• Truth Table Approach F 1 F2
A B C
=0 0 0 0 0 0
0 0
=0
=0
=0 0
=0 0
=0
0 1
=0
=0
0
=0 0
=0
0
=0
=0
0 1 0 1 0 0 1 0
A 1 0 1 0 A 0 1 1 1
C C
F1=AB'C'+A'BC'+A'B'C+ABC F2=AB+AC+BC
Ref: Mano, Morris M., Ciletti, Michael D. (2013) Digital Design 11 / 65
Design Procedure
• Given a problem statement:
• Determine the number of inputs and outputs
• Derive the truth table
• Simplify the Boolean expression for each output
• Produce the required circuit
Example:
Design a circuit to convert a “BCD” code to “Excess 3” code
4-bits 4-bits
0-9
?
values Value+3
x
S S
x
y y
C
z
z C
z C
x
S
y
C
x3 x2 x1 x0
y3 y2 y1 y0
0
FA FA FA FA
C4 C3 C2 C1
S3 S S
2 Ciletti, Michael D. (2013) Digital
Ref: Mano, Morris M., 1 Design
S0 20 / 65
Binary• Carry
AdderPropagate Adder
x 7 x 6 x5 x4 x3 x2 x1 x0
y7 y6 y5 y4 y3 y2 y1 y0
A3 A2 A1 A0 B3 B2 B1 B0 A3 A2 A1 A0 B3 B2 B1 B0
CPA
Cy C0 CPA
Cy C0 0
S3 S2 S1 S0 S3 S2 S1 S0
S7 S6 S5 S4 S3 S2 S1 S0
0+9 0 0 0 0 1 0 0 1 =9 0 1 0 0 1
1+0 0 0 0 1 0 0 0 0 =1 0 0 0 0 1
1+1 0 0 0 1 0 0 0 1 =2 0 0 0 1 0
1+8 0 0 0 1 1 0 0 0 =9 0 1 0 0 1
1+9 0 0 0 1 1 0 0 1 =A 0 1 0 1 0 Invalid Code
2+0 0 0 1 0 0 0 0 0 =2 0 0 0 1 0
9+0 1 0 0 1 0 0 0 0 =9 0 1 0 0 1 0 0 0 0 1 0 0 1 =9
9+1 1 0 0 1 0 0 0 1 = 10 0 1 0 1 0 0 0 0 1 0 0 0 0 = 16
9+2 1 0 0 1 0 0 1 0 = 11 0 1 0 1 1 0 0 0 1 0 0 0 1 = 17
9+3 1 0 0 1 0 0 1 1 = 12 0 1 1 0 0 0 0 0 1 0 0 1 0 = 18
9+4 1 0 0 1 0 1 0 0 = 13 0 1 1 0 1 0 0 0 1 0 0 1 1 = 19
9+5 1 0 0 1 0 1 0 1 = 14 0 1 1 1 0 0 0 0 1 0 1 0 0 = 20
9+6 1 0 0 1 0 1 1 0 = 15 0 1 1 1 1 0 0 0 1 0 1 0 1 = 21
9+7 1 0 0 1 0 1 1 1 = 16 1 0 0 0 0 0 0 0 1 0 1 1 0 = 22
9+8 1 0 0 1 1 0 0 0 = 17 1 0 0 0 1 0 0 0 1 0 1 1 1 = 23
9+9 1 0 0 1 1 0 0 1 = 18 1 0 0 1 0 0 0 0 1 1 0 0 0 = 24
+6
S3 S2 S1 S0 Err
S1
0 0 0 0 0
1 0 0 0 0 S2
1 0 0 1 0 1 1 1 1
S3 1 1
1 0 1 0 1
S0
1 0 1 1 1
1 1 0 0 1
Err = S3 S2 + S3 S1
1 1 0 1 1
1 1 1 0 1
1 1 1 1 1
Ref: Mano, Morris M., Ciletti, Michael D. (2013) Digital Design 28 / 65
BCD Adder
Err
FA FA FA FA
Carry
• 2’s Complement Numbers
C 4 C3 C2 C1
S 3 S2 S1 S0
x3 x2 x1 x0
y3 y2 y1 y0
0
FA FA FA FA
Overflow C4
S3
C3
S2
C2
S1
C1
S0
Ref: Mano, Morris M., Ciletti, Michael D. (2013) Digital Design 32 / 65
Magnitude Comparator
• Compare 4-bit number to 4-bit number
• 3 Outputs: < , = , >
• Expandable to more number of bits
A3A2A1A0 B3B2B1B0
Magnitude
Comparator
A3 A2 A1 A0 B3 B2 B1 B0 A3 A2 A1 A0 B3 B2 B1 B0
0 I(A>B) I(A>B)
Magnitude Magnitude
1 I(A=B) I(A=B)
Comparator Comparator
0 I(A<B) I(A<B)
A<B A=B A>B A<B A=B A>B
1
x1 0 0
Binary
0 0
x0 Decoder
0
y3
Decoder
I1
Binary
y2
y1
I0
y0
I1 I0 Y3 Y2 Y1 Y0
0 0 0 0 0 1
0 1 0 0 1 0
1 0 0 1 0 0
1 1 1 0 0 0
Ref: Mano, Morris M., Ciletti, Michael D. (2013) Digital Design 37 / 65
Decoders
• 3-to-8 Line Decoder
Y7
Y6
Y5
Decoder
I2
Binary Y4
I1
Y3
I0
Y2
Y1
Y0
Decoder
I1
Binary
Y2
I0
Y1
E
Y0
E I1 I0 Y3 Y2 Y1 Y0
0 x x 0 0 0 0
1 0 0 0 0 0 1
1 0 1 0 0 1 0
1 1 0 0 1 0 0
1 1 1 1 0 0 0
Ref: Mano, Morris M., Ciletti, Michael D. (2013) Digital Design 39 / 65
Decoders
• Expansion I 2 I1 I0
I2 I1 I0 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
0 0 0 0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0 1 0 Y3 Y7
Decoder
I0
Y6
Binary
0 1 0 0 0 0 0 0 1 0 0 Y2
I1
0 1 1 0 0 0 0 1 0 0 0 Y1 Y5
1 0 0 0 0 0 1 0 0 0 0 E
Y0 Y4
1 0 1 0 0 1 0 0 0 0 0
1 1 0 0 1 0 0 0 0 0 0 Y3
Decoder
1 1 1 1 0 0 0 0 0 0 0 I0
Binary
Y2 Y3
I1
Y1 Y2
E
Y0 Y1
Ref: Mano, Morris M., Ciletti, Michael D. (2013) Digital Design
Y0 40 / 65
Decoders
• Active-High / Active-Low
I1 I0 Y3 Y2 Y1 Y0 I1 I0 Y3 Y2 Y1 Y0
0 0 0 0 0 1 0 0 1 1 1 0
0 1 0 0 1 0 0 1 1 1 0 1
1 0 0 1 0 0 1 0 1 0 1 1
1 1 1 0 0 0 1 1 0 1 1 1
Y3 Y3
Decoder
Decoder
I1 I1
Binary
Binary
Y2 Y2
Y1 Y1
I0 I0
Y0 Y0
Y7 Y7
Y6 Y6
Y5 Y5
x I2 x I2
Y4 Y4
y I1 y I1
z Y3 z Y3
I0 I0
Y2 Y2
Y1 Y1
Y0 Y0
S C
S C
Ref: Mano, Morris M., Ciletti, Michael D. (2013) Digital Design 43 / 65
Encoders
• Put “Information” into code
Only one
• Binary Encoder switch
• Example: 4-to-2 Binary Encoder should be
activated
at a time
x1
x3 x2 x1 y1 y0
y1 0 0 0 0 0
x2 Binary
0 0 1 0 1
Encoder
y0 0 1 0 1 0
x3
1 0 0 1 1
Encoder
I5 Y2
Binary
0 0 0 0 0 0 1 0 0 0 1
0 0 0 0 0 1 0 0 0 1 0 I4 Y1
0 0 0 0 1 0 0 0 0 1 1 I3 Y0
0 0 0 1 0 0 0 0 1 0 0 I2
0 0 1 0 0 0 0 0 1 0 1 I1
0 1 0 0 0 0 0 0 1 1 0
1 0 0 0 0 0 0 0 1 1 1 I0
Encoder
I 3 I2 I 1 I 0 Y1 Y0 V
Priority
I2 Y1
0 0 0 0 0 0 0
I1 Y0
0 0 0 1 0 0 1 I0
0 0 1 x 0 1 1
0 1 x x 1 0 1
1 x x x 1 1 1
I1
Y1
1 1 1 1
1 1 1 1
I2
I3 1 1 1 1
I0
Ref: Mano, Morris M., Ciletti, Michael D. (2013) Digital Design 46 / 65
Encoder / Decoder Pairs
Binary Binary
Encoder Decoder
I7 Y7
I6 Y6
I5 Y5
Y2 I2
I4 Y4
Y1 I1
I3 Y3
Y0 I0
I2 Y2
I1 Y1
I0 Y0
S1 S0 Y
I0
0 0 I0 I1
I1 MUX Y
0 1 I2
1 0 I2 I3 S1 S0
1 1 I3
Ref: Mano, Morris M., Ciletti, Michael D. (2013) Digital Design 48 / 65
Multiplexers
• 2-to-1 MUX
I0
MUX Y
I1
S
• 4-to-1 MUX
I0
I1
MUX Y
I2
I3 S1 S0
Ref: Mano, Morris M., Ciletti, Michael D. (2013) Digital Design 49 / 65
Multiplexers
• Quad 2-to-1 MUX
x3 I0
y3 MUX Y
I1 S
x2 I0
MUX Y
y2 I1 S
A3
A2
I0 A1 Y3
MUX Y A0
I1 S Y
MUX 2
x1 B3 Y1
y1 B2 Y0
I0
MUX Y B1
I1 S B0 S E
S
x0 Ref: Mano, Morris M., Ciletti, Michael D. (2013) Digital Design 50 / 65
Multiplexers
• Quad 2-to-1 MUX
A3
A2
A1 Y3
A0
MUX Y2
B3 Y1
B2 Y0
B1
B0 S E
Extra
Buffers
Ref: Mano, Morris M., Ciletti, Michael D. (2013) Digital Design 51 / 65
Implementation
• Example
Using Multiplexers
F(x, y) = ∑(0, 1, 3)
x y F
1 I0
0 0 1 1 I1
MUX Y F
0 1 1 0 I2
1 0 0 1 I3 S1 S0
1 1 1
x y
x y z F
0 0 0 0 z I0
0 0 1 1 F=z z I1
F
MUX Y
0 1 0 1 0 I2
0 1 1 0 F=z 1 I3 S1 S0
1 0 0 0
F=0 x y
1 0 1 0
1 1 0 1
F=1
1 1 1 1
Ref: Mano, Morris M., Ciletti, Michael D. (2013) Digital Design 54 / 65
Implementation
• Example
Using Multiplexers
F(A, B, C, D) = ∑(1, 3, 4, 11, 12, 13, 14, 15)
A B C D F
0 0 0 0 0
F=D
D I0
0 0 0 1 1
0 0 1 0 0 D I1
0 0 1 1 1 F=D D
0 1 0 0 1
I2
F=D 0
0 1 0 1 0 I3 MUX Y F
0 1 1 0 0 0
0 1 1 1 0 F=0 I4
1 0 0 0 0
D
1 0 0 1 0 F=0 1 I5
1 0 1 0 0
F=D 1 I6
1 0 1 1 1
1 1 0 0 1 SI2 7S1 S0
1 1 0 1 1
F=1
1 1 1 0 1
1 1 1 1 1 F=1 A B C
Ref: Mano, Morris M., Ciletti, Michael D. (2013) Digital Design 55 / 65
Multiplexer Expansion
• 8-to-1 MUX using Dual 4-to-1 MUX
I0 I0
I1 I1
MUX Y
I2 I2
I3 I3 S1 S0
I0
MUX Y Y
I1
I0 S
I4 I1
I5 MUX Y
I2
I6 I3 S1 S0
I7
1 0 0
S2 S1 S0
Ref: Mano, Morris M., Ciletti, Michael D. (2013) Digital Design 56 / 65
DeMultiplexers
Y3
Y2
I DeMUX
Y1
S1 S0 Y0
S1 S0 Y3 Y2 Y1 Y0
0 0 0 0 0 I
0 1 0 0 I 0
1 0 0 I 0 0
1 1 I 0 0 0
Ref: Mano, Morris M., Ciletti, Michael D. (2013) Digital Design 57 / 65
Multiplexer
MUX
/ DeMultiplexer Pairs
DeMUX
I7 Y7
I6 Y6
I5 Y5
I4 Y Y4
I
I3 Y3
I2 Y2
I1 Y1
Y0
SI2 0S1 S0 S2 S1 S0
Synchronize
x2 x1 x0 y2 y1 y0
Ref: Mano, Morris M., Ciletti, Michael D. (2013) Digital Design 58 / 65
DeMultiplexers / Decoders
Y3 Y3
Decoder
I1
Y2
Binary
Y2
I DeMUX I0
Y1 Y1
E
S1 S0 Y0 Y0
E I1 I 0 Y3 Y2 Y1 Y0
S1 S0 Y3 Y2 Y1 Y0 0 x x 0 0 0 0
0 0 0 0 0 I 1 0 0 0 0 0 1
0 1 0 0 I 0 1 0 1 0 0 1 0
1 0 0 I 0 0 1 1 0 0 1 0 0
1 1 I 0 0 0 1 1 1 1 0 0 0
Not Allowed
D
A
C A if C = 1
Y= B if C = 0
B
Ref: Mano, Morris M., Ciletti, Michael D. (2013) Digital Design 61 / 65
Three-State Gates
I3
I2
Y
I1
I0
Y3
Decoder
S1 I1 Binary Y2
S0 I0
Y1
E E
Y0 D. (2013) Digital Design
Ref: Mano, Morris M., Ciletti, Michael 62 / 65