Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 140 Lecture 13 Professor CK Cheng 11/12/02.

Similar presentations


Presentation on theme: "CS 140 Lecture 13 Professor CK Cheng 11/12/02."— Presentation transcript:

1 CS 140 Lecture 13 Professor CK Cheng 11/12/02

2 Part II. Standard Modules
Decoder, Encoder Multiplexer, DeMultiplexer

3 MUX (Multiplexer) EN If EN = 1 D2n-1,0 y = Di i = (Sn-1, .. , S0) y
(Data input) (Control Input) Sn-1,0

4 Example EN D0 D1 1 y If D0 = 0 and S1S0 = 00, y = 0
D1 1 y If D0 = 0 and S1S0 = 00, y = 0 If D0 = 1 and S1S0 = 00, y = 1 D2 2 D3 3 S1 S0

5 Multiplexers as a universal set
Example: Given f (a,b,c) = Sm (0,1,7) + Sd(2) 1) Implement with an 8-input Mux. EN Id a b c f 1 1 2 3 4 5 6 7 1 y 1 S2 S1 S0 a b c

6 2) Implement with 4-input Muxes
a 1 b 1 c = 0 1 - c = 1 1 D (c) D0 (c) =1 D1 (c) =0 D2 (c) =0 D3 (c) =c 1 1 y 2 c 3 S1 S0 y(a,b,c) y(0,0,c) = D0 y(0,0,1) = D1 y(1,0,c) = D2 y(1,1,c) = D3 a b

7 2) Implement with 2-input Muxes
a 1 D (b,c) D0 (b,c) D1 (b,c) EN b’ EN D0 (b,c) = b’ D1 (b,c) = bc y 1 1 1 b b c a c c D1 (b,c) b b 1 c = 0 c = 1 1 l1(0) = 0 l1(c) = c

8 Demultiplexers EN yi = x if i = (Sn-1, .. , S0) & EN = 1 = 0 otherwise
y2n-1 (Control Input) Sn-1

9 Shifter xn xn-1 x0 x-1 yi = xi-1 if EN = 1, s = 1, and d = left
= xi+1 if EN = 1, s = 1, and d = right = xi if EN = 1, s = 0 = 0 if EN = 0 s s / n EN d l / r yn-1 y0 xi+1 xi xi-1 Can be implemented with a mux s 1 EN d yi

10 Barrel Shifter shift x 0 1 0 1 0 1 O or 1 shift s0 O or 2 shift s1 0 1
0 1 0 1 0 1 O or 1 shift s0 O or 2 shift s1 0 1 0 1 0 1 0 1 0 1 O or 4 shift s2 y 0 1 0 1 0 1 0 1 0 1 0 1


Download ppt "CS 140 Lecture 13 Professor CK Cheng 11/12/02."

Similar presentations


Ads by Google