I this lesso, you will lear about: Multiplexers ad Demultiplexers 1. Multiplexers 2. Combiatioal circuit implemetatio with multiplexers 3. Demultiplexers 4. Some examples Multiplexer A Multiplexer (see Figure 1) is a combiatioal circuit that selects oe of the 2 iput sigals (D, D 1, D 2,, D 2-1 ) to be passed to the sigle output lie Y. Q. How to select the iput lie (out of the possible 2 iput sigals) to be passed to the output lie? A. Selectio of the particular iput to be passed to the output is cotrolled by a set of iput sigals called Select Iputs (S, S 1, S 2,., S -1 ). Figure 1: Multiplexer Example 1: 2x1 Mux A 2x1 Mux has 2 iput lies (D & D 1 ), oe select iput (S), ad oe output lie (Y). (see Figure 2) IF S=, the Y= D Else (S=1) Y= D 1
D MUX Y D1 S Figure 2: A 2 X 1 Multiplexer Thus, the output sigal Y ca be expressed as: Y = S D + S D 1 Example 2: 4x1 Mux A 4x1 Mux has 4 iput lies (D, D 1, D 2, D 3 ), two select iputs (S & S 1 ), ad oe output lie Y. (see Figure 3) IF S 1 S =, the Y= D IF S 1 S =1, the Y= D 1 IF S 1 S =1, the Y= D 2 IF S 1 S =11, the Y= D 3 Thus, the output sigal Y ca be expressed as: miterm miterm miterm miterm m m1 m2 m3 Obviously, the iput selected to be passed to the output depeds o the miterm expressios of the select iputs. Figure 3: A 4 X 1 Multiplexer
I Geeral, For MUXes with select iputs, the output Y is give by Y = m D + m 1 D 1 + m 2 D 2 +. + m 2-1D 2 1 Where m i = i th miterm of the Select Iputs Thus Y = 2 1 i= m i D i Example 3: Quad 2X1 Mux Give two 4-bit umbers A ad B, desig a multiplexer that selects oe of these 2 umbers based o some select sigal S. Obviously, the output (Y) is a 4-bit umber. A A 1 A 2 A 3 Quad 2-1 MUX Y Y 1 B B 1 Y 2 Y 3 B 2 B 3 S Figure 4: Quad 2 X 1 Multiplexer The 4-bit output umber Y is defied as follows: Y = A IF S=, otherwise Y = B The circuit is implemeted usig four 2x1 Muxes, where the output of each of the Muxes gives oe of the outputs (Y i ). Combiatioal Circuit Implemetatio usig Muxes Problem Statemet: Give a fuctio of -variables, show how to use a MUX to implemet this fuctio. This ca be accomplished i oe of 2 ways: Usig a Mux with -select iputs Usig a Mux with -1 select iputs Method 1: Usig a Mux with -select iputs variables eed to be coected to select iputs. For a MUX with select iputs, the output Y is give by:
Y = m D + m 1 D 1 + m 2 D 2 +... + m 2-1 D 2 1 Alteratively, Y = Where m i = i th 2 1 i= m i D i miterm of the Select Iputs The MUX output expressio is a SUM of miterms expressio for all miterms (m i ) which have their correspodig iputs (D i ) equal to 1. Thus, it is possible to implemet ay fuctio of -variables usig a MUX with -select iputs by proper assigmet of the iput values (D i {, 1}). Y(S -1.. S 1 S ) = (miterms) Example 4: Implemet the fuctio F (A, B, C) = (1, 3, 5, 6) (see Figure 5) Sice umber of variables = 3, this requires a Mux with 3 select iputs, i.e. a 8x1 Mux The most sigificat variable A is coected to the most sigificat select iput S 2 while the least sigificat variable C is coected to the least sigificat select iput S, thus: S 2 = A, S 1 = B, ad S = C For the MUX output expressio (sum of miterms) to iclude miterm 1 we assig D 1 =1 Likewise, to iclude miterms 3, 5, ad 6 i the sum of miterms expressio while excludig miterms, 2, 4, ad 7, the followig iput (D i ) assigmets are made D 1 = D 3 = D 5 = D 6 = 1 D = D 2 = D 4 = D 7 = D 1 D1 D2 1 D3 1 D4 D5 Y F(A,B, C) = (1,3,5,6 ) 1 D6 D7 S 1 S 2 S A B C Figure 5: Implemetig fuctio with Mux with select iputs
Method 2: Usig a Mux with (-1) select iputs Ay -variable logic fuctio ca be implemeted usig a Mux with oly (-1) select iputs (e.g 4-to-1 mux to implemet ay 3 variable fuctio) This ca be accomplished as follows: Express fuctio i caoical sum-of-miterms form. Choose -1 variables to be coected to the mux select lies. Costruct the truth table of the fuctio, but groupig the -1 select iput variables together (e.g. by makig the -1 select variables as most sigificat iputs). The values of D i (mux iput lie) will be, or 1, or th variable or complemet of th variable of value of fuctio F, as will be clarified by the followig example. Example 5: Implemet the fuctio F (A, B, C) = (1, 2, 6, 7) (see figure 6) This fuctio ca be implemeted with a 4-to-1 lie MUX. A ad B are applied to the select lie, that is A S 1, B S The truth table of the fuctio ad the implemetatio are as show: Figure 6: Implemetig fuctio with Mux with -1 select iputs
Example 6: Cosider the fuctio F(A,B,C,D)= (1,3,4,11,12,13,14,15) This fuctio ca be implemeted with a 8-to-1 lie MUX (see Figure 7) A, B, ad C are applied to the select iputs as follows: A S 2, B S 1, C S The truth table ad implemetatio are show. Figure 7: Implemetig fuctio of Example 6 Demultiplexer It is a digital fuctio that performs iverse of the multiplexig operatio. It has oe iput lie (E) ad trasmits it to oe of 2 possible output lies (D, D 1, D 2,, D 2-1 ). The selectio of the specific output is cotrolled by the bit combiatio of select iputs.
D D 1 D 2 Movig Arm D 3 D 4 E D 5 D 2-1 Figure 8: A demultiplexer Example 7: A 1-to-4 lie Demux The iput E is directed to oe of the outputs, as specified by the two select lies S 1 ad S. D = E if S 1 S = D = S 1 S E D 1 = E if S 1 S = 1 D 1 = S 1 S E D 2 = E if S 1 S = 1 D 2 = S 1 S E D 3 = E if S 1 S = 11 D 3 = S 1 S E A careful ispectio of the Demux circuit shows that it is idetical to a 2 to 4 decoder with eable iput. E A 1 A D D 1 D 2 D 3 Figure 8: A 1-to-4 lie demultiplexer For the decoder, the iputs are A 1 ad A, ad the eable is iput E. (see figure 9) For demux, iput E provides the data, while other iputs accept the selectio variables. Although the two circuits have differet applicatios, their logic diagrams are exactly the same.
Decimal Eable Iputs Outputs value E A 1 A D D 1 D 2 D 3 X X 1 1 1 1 1 1 2 1 1 1 3 1 1 1 1 Figure 9: Table for 1-to-4 lie demultiplexer