Cpe358/Cs381 Switching Theory and Logical Design Class 5
Cpe358/Cs381 Switching Theory and Logical Design Class 5
www.UandiStar
1-152
Today
Fundamental concepts of digital systems (Mano Chapter 1) Binary codes, number systems, and arithmetic (Ch 1) Boolean algebra (Ch 2) Simplification of switching equations (Ch 3) Digital device characteristics (e.g., TTL, CMOS)/design considerations (Ch 10) Combinatoric logical design including LSI implementation (Chapter 4) Hazards, Races, and time related issues in digital design (Ch 9) Flip-flops and state memory elements (Ch 5) Sequential logic analysis and design (Ch 5) Synchronous vs. asynchronous design (Ch 9) Counters, shift register circuits (Ch 6) Memory and Programmable logic (Ch 7) Minimization of sequential systems Introduction to Finite Automata
www.UandiStar
1-153
www.UandiStar
1-154
I
n inputs
Combinational Circuit
O
m outputs
1-155
b a a g f g e d c
1-156
F(x,y,z)
F ( x, y , z ) = x i y + x 'iz
Design procedure: Given F( ), design a logic circuit that implements F( ) with minimum number of gates
w x y F(x,y,z)
www.UandiStar
1-157
Analysis
Consider this logic diagram what function does it perform?: a b F(a,b,c,d,e,f) c d
e f
www.UandiStar
1-158
Analysis
Consider this logic diagram what function does it perform?: a b c d T1 T2 F(a,b,c,d,e,f) T3 T4 1. e f Label first level gate outputs
e f
www.UandiStar
1-159
Analysis
Consider this logic diagram what function does it perform?: a b c d T1 T2 F(a,b,c,d,e,f) T3 T4 1. 2. T1=efa T2=efb T3=efc T4=efd Label first level gate outputs Determine Boolean functions
e f
e f
www.UandiStar
1-160
Analysis
Consider this logic diagram what function does it perform?: a b c d T1 T2 F(a,b,c,d,e,f) T3 T4 T1=efa T2=efb T3=efc T4=efd 1. Label first level gate outputs 2. Determine Boolean functions 3. Iterate until reaching output F(a,b,c,d,e,f) = T1 + T2 + T3 + T4 F(a,b,c,d,e,f) = efa + efb + efc + efd
e f
e f
www.UandiStar
1-161
Analysis
Consider this logic diagram what function does it perform?: a b c d T1 T2 F(a,b,c,d,e,f) T3 T4 T1=efa T2=efb T3=efc T4=efd 1. Label first level gate outputs 2. Determine Boolean functions 3. Iterate until reaching output F(a,b,c,d,e,f) = T1 + T2 + T3 + T4 F(a,b,c,d,e,f) = efa + efb + efc + efd F( ) F( ) is a 4 input MUX
www.UandiStar
Copyright 2004 Stevens Institute of Technology All rights reserved 1-162
e f
e f a b c d
00 01 10 11
ef
Design
Design a 2-line to 4-line decoder with enable 1. Create a high-level function definition
www.UandiStar
1-163
Design
Design a 2-line to 4-line decoder with enable A1 A0 E B3 B2 B1 B0 1. Create a high-level function definition, determine I/O requirements
www.UandiStar
1-164
Design
Design a 2-line to 4-line decoder with enable A1 A0 E
E 0 1 1 1 1 A1 X 0 0 1 1 A0 X 0 1 0 1 B0 0 1 0 0 0 B1 0 0 1 0 0 B2 0 0 0 1 0 B3 0 0 0 0 1
1. 2.
B3 B2 B1 B0
Create a high-level function definition, determine I/O requirements Define truth table
www.UandiStar
1-165
Design
Design a 2-line to 4-line decoder with enable A1 A0 E
E 0 1 1 1 1 A1 X 0 0 1 1 A0 X 0 1 0 1 B0 0 1 0 0 0 B1 0 0 1 0 0 B2 0 0 0 1 0 B3 0 0 0 0 1
1. 2. 3.
B3 B2 B1 B0
Create a high-level function definition, determine I/O requirements Define truth table Derive Boolean functions for each output
www.UandiStar
1-166
Design
Design a 2-line to 4-line decoder with enable A1 A0 E
E 0 1 1 1 1 A1 X 0 0 1 1 A0 X 0 1 0 1 B0 0 1 0 0 0 B1 0 0 1 0 0 B2 0 0 0 1 0 B3 0 0 0 0 1
1. 2. 3. 4.
B3 B2 B1 B0
Create a high-level function definition, determine I/O requirements Define truth table Derive Boolean functions for each output Draw the logic diagram and verify correctness B0 = EA1A0 B1 = EA1A0 B2 = EA1A0 B3 = EA1A0 B3 B2 B1 B0
www.UandiStar
E A1 A0
1-167
* carry
www.UandiStar
1-168
sum
carry
www.UandiStar
1-169
sum
carry
carry (a, b ) = ab
www.UandiStar
1-170
Half Adder
carry (a, b ) = ab
a b
sum(a,b)
carry(a,b)
a b HA sum
carry
www.UandiStar
CpE358/CS381 Switching Theory and Logical Design Summer-1 2004 Copyright 2004 Stevens Institute of Technology All rights reserved
1-171
Full Adder
ai bi c_ini FA
sumi
c_outi
www.UandiStar
1-172
Full Adder
ai bi c_ini
a 0 0 0 0 1 1 1 1 b 0 0 1 1 0 0 1 1 cin 0 1 0 1 0 1 0 1 cout 0 0 0 1 0 1 1 1
FA
sumi
c_outi
sum 0 1 1 0 1 0 0 1 www.UandiStar
Copyright 2004 Stevens Institute of Technology All rights reserved
1-173
Full Adder
ai bi c_ini
a 0 0 0 0 1 1 1 1 b 0 0 1 1 0 0 1 1 cin 0 1 0 1 0 1 0 1 cout 0 0 0 1 0 1 1 1
ab FA sumi c 0 c_outi
sum 0 1 1 0 1 0 0 1
a 00 01 11 10
0 1 1 0 0 1 1 0
sum
b ab c 0 c 1 a 00 01 11 10
0 0 0 1 1 1 0 1
carry
b
CpE358/CS381 Switching Theory and Logical Design Summer-1 2004 Copyright 2004 Stevens Institute of Technology All rights reserved 1-174
www.UandiStar
Full Adder
ai bi c_ini
a 0 0 0 0 1 1 1 1 b 0 0 1 1 0 0 1 1 cin 0 1 0 1 0 1 0 1 cout 0 0 0 1 0 1 1 1
ab FA sumi c 0 c_outi
sum 0 1 1 0 1 0 0 1
Copyright 2004 Stevens Institute of Technology All rights reserved
a 00 01 11 10
0 1 1 0 0 1 1 0
sum
b ab c 0 c 1
sum(a, b, ci ) = a b ci
a
00 01 11 10
0 0 0 1 1 1 0 1
carry
b c (a, b, c ) = ac + bc + ab o i i i
1-175
www.UandiStar
a b ci FA s co
www.UandiStar
1-176
Binary Adder
Multiple Full Adders can be cascaded to create an arbitrary precision adder
An-1 Bn-1
A2 B2
A1 B1
A0 B0
Cn
a s
co FA ci
Cn-1
C3
a s
co FA ci
C2
a s
co FA ci
C1
a s
co FA ci
C0
Sn-1
S2
S1
S0
www.UandiStar
1-177
Binary Adder
Multiple Full Adders can be cascaded to create an arbitrary precision adder But there is an accumulation of delay through the carry stages AN-1 BN-1 A2 B2 A1 B1 A0 B0
CN
a s
co FA ci
CN-1
C3
a s
co FA ci
C2
a s
co FA ci
C1
a s
co FA ci
C0
2 XOR delays
1 AND + 1 OR delays S2 S1 S0
www.UandiStar
1-178
Sum
Calculationk
Calculationk+1
Carryi
Carryi+1
Calculationk
Calculationk+1
Carryi+2
Calculationk
Calculationk+1
Carryi+3
Calculationk
Calculationk+1 1 XOR delay ~3 gate delays 1 AND delay ~2 gate delays 1 OR delay ~2 gate delays
1-179
www.UandiStar
Carries in Adders
Consider the 8-bit sum: 01111111 +00000001 10000000 There is a carry at each stage If the necessary carries could be scanned once in advance of the addition, incremental delays could be avoided
www.UandiStar
1-180
Carries in Adders
C4
a HA b c s
C4 S3
P3 G3
C3
a HA b
s c
P2 G2
C2
a HA b
s c
S2
C1
S1
G1
a HA b
s c
P0 G0 S0 C0
C0 www.UandiStar
1-181
x=rx
B +1
01001001 +11001011 100010100 73 -53 20
11001010+1
www.UandiStar
1-182
x=rx
B +1
01001001 +11001011 100010100 73 -53 20
11001010+1
B3 B2 B = 1s complement A B1 B0 C0
www.UandiStar
Copyright 2004 Stevens Institute of Technology All rights reserved 1-183
B+C0 = 2s complement A
Adder/Subtractor
An-1 A2 A1 A0 M Bn-1 B2 B1 B0
C V
Cn
a s
co FA ci
Cn-1
C3
a s
co FA ci
C2
a s
co FA ci
C1
a s
co FA ci
C0
S2
S1
S0
www.UandiStar
1-184
Review of Multiplication
Decimal
carries
www.UandiStar
1-185
Review of Multiplication
Decimal Binary 123 x 45 615 492 5535 101101 x 11001 101101 no carries 000000 (replicate 000000 and 101101 shift) 101101 10001100101
carries
www.UandiStar
1-186
a c HA s
a c HA s
C3
C2
C1
C0
www.UandiStar
1-187
A3
A2
A1
A0 B3 4-bit adder Co S3
B2 S2
B1 S1
B0 S0
C6
CpE358/CS381 Switching Theory and Logical Design Summer-1 2004
C5
C4
C3
C2
C1
C0
www.UandiStar
1-188
TS
Data_out
Bank 1
E AN AN+1 B0 A0 A1
TS
2-bit to 4-line
E
B1 B2 B3
Bank 2
E
TS
Bank 3
AN+2 E E
TS
2-bit to 4-line
CpE358/CS381 Switching Theory and Logical Design Summer-1 2004
Banks 4-7
www.UandiStar
1-189
E 0 1 1 1 1
A1 X 0 0 1 1
A0 X 0 1 0 1
B0 0 1 0 0 0
B1 0 0 1 0 0
B2 0 0 0 1 0
B3 0 0 0 0 1
E A1 A0
B3 B2 B1 B0
www.UandiStar
1-190
E A1 A0
B3 B2 B1 B0
B7 B6 B5 B4 B3 B2 B1 B0
www.UandiStar
A1 A0
E A1 A0
B3 B2 B1 B0
1-191
Encoder
Encoder performs inverse operation of Decoder
1 A1 A0
B3 B2 B1 B0
B3 B2 B1 B0 A0 A1 F(A0,A1) = (A0,A1)
www.UandiStar
1-192
x = D4 + D5 + D6+ D7 y = D2 + D3 + D6+ D7 z = D1 + D3 + D5+ D7 What should output be for input (00000000)? What about (00100100)?
www.UandiStar
CpE358/CS381 Switching Theory and Logical Design Summer-1 2004 Copyright 2004 Stevens Institute of Technology All rights reserved 1-193
Priority Encoder
Inputs D0 0 1 X X X X X X X D1 0 0 1 X X X X X X D2 0 0 0 1 X X X X X D3 0 0 0 0 1 X X X X D4 0 0 0 0 0 1 X X X D5 0 0 0 0 0 0 1 X X D6 0 0 0 0 0 0 0 1 X D7 0 0 0 0 0 0 0 0 1 x X 0 0 0 0 1 1 1 1 Outputs y X 0 0 1 1 0 0 1 1 z X 0 1 0 1 0 1 0 1 V 0 1 1 1 1 1 1 1 1
Output encodes the largest (highest index) input that is 1. V indicates if there are any 1s in the input
www.UandiStar
1-194
Multiplexer
I0 I1 I2 I3 S1 S0 S1 S0
I0 I1 I2 I3 S1S0 www.UandiStar
CpE358/CS381 Switching Theory and Logical Design Summer-1 2004 Copyright 2004 Stevens Institute of Technology All rights reserved
I0 I1 Y I2 I3 Y
B0 A0 A1
2-bit to 4-line
E
B1 B2 B3
00 01 10 11
1-195
I0 I1 I2 I3 S1 S0 Y
B B B B
C C C C
D D D D
E E E E
F F F F
I0A I1A I2A I3A I0B I1B I2B I3B I0C I1C I2C I3C I0D I1D I2D I3D I0E I1E I2E I3E I0F I1F
www.UandiStar
CpE358/CS381 Switching Theory and Logical Design Summer-1 2004 Copyright 2004 Stevens Institute of Technology All rights reserved 1-196
0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
0 0 0 0 0 0
0 0 1 1 1 1 1 1 1 1
www.UandiStar
1-197
DEMUX
I
00 01 10 11 S1S0 Y0 Y1 Y2 Y3
Y0 Y1 Y2 Y3
B0
A0 A1
2-bit to 4-line
E
B1 B2 B3
www.UandiStar
1-198
I0 I1 I2 I3
00 01 10 11
Most speech signals in the telephone plant is carried on T1 transmission facility: 24 voice channels, each sampled at 8 kHz with 8 bits/channel + synchronization = 1.544 Mb/s Multiple T1s are combined to form a T3 line at ~45 Mb/s
www.UandiStar
CpE358/CS381 Switching Theory and Logical Design Summer-1 2004 Copyright 2004 Stevens Institute of Technology All rights reserved 1-199
Summary
Fundamental concepts of digital systems (Mano Chapter 1) Binary codes, number systems, and arithmetic (Ch 1) Boolean algebra (Ch 2) Simplification of switching equations (Ch 3) Digital device characteristics (e.g., TTL, CMOS)/design considerations (Ch 10) Combinatoric logical design including LSI implementation (Chapter 4) Hazards, Races, and time related issues in digital design (Ch 9) Flip-flops and state memory elements (Ch 5) Sequential logic analysis and design (Ch 5) Synchronous vs. asynchronous design (Ch 9) Counters, shift register circuits (Ch 6) Memory and Programmable logic (Ch 7) Minimization of sequential systems Introduction to Finite Automata
www.UandiStar
1-200
www.UandiStar
1-201