Electrical – 4 To 1 MUX – Figuring out the inputs

digital-logickarnaugh mapmultiplexer

If i have a 2to1 mux together with logic gates like this:

enter image description here

I can simply create a karnaugh map and test the different values of XYZ and get a function.

From this i get the function f = x'z + yz + x'y

However in the next task, I am supposed to look at this 4to1 MUX
enter image description here

And decide what inputs to use to achieve the same function f = x'z + yz + x'y

The four different alternatives I get to choose from on each input are:(0,1,Z,Z')

In the task I am also told to create a new karnaugh map for this 4to1 MUX.

I just don't get how I am supposed to think about the inputs to get the same function, or maybe I have misunderstood something.

Best Answer

Start by looking at the equation for a 2-in MUX:

$$ \begin{align*} M(A,B,S) &= A\cdot \bar{S} + B\cdot S \end{align*} $$

From this, you can derive some useful results (among others not listed here):

$$ \begin{align*} 1.~~~M(0,x,y) &= x\cdot y \\ 2.~~~M(x,0,y) &= x\cdot\overline{y} \\ 3.~~~M(x,y,0) &= x \\ 4.~~~M(1,x,y) &= x + \overline{y} \\ 5.~~~M(x,1,y) &= x + y \\ 6.~~~M(x,y,1) &= y \\ 7.~~~M(x,y,x) &= x\cdot y \\ 8.~~~M(x,y,y) &= x + y \\ \end{align*} $$

Now, your equation is:

$$f = \overline{x}z + yz + \overline{x}y = \overline{x}\left(y+z\right) + xyz $$

And you already have your required mux template laid out as:

schematic

simulate this circuit – Schematic created using CircuitLab

You could use a number of different approaches. But let's just use our imagination only and work from that.

The last mux, where \$x\$ is the selection input, selects between the following two options:

$$\begin{array}{rl} \overline{x}&z+y \\ x & yz \end{array}$$

Well, if you look up at the table of "useful results" above, you can easily see how to implement these.

For \$\overline{x}\$, you see from the table that either #5 or #8 would do the job here. Depending on what you feel is appropriate for your answer, pick one or the other.

For \$x\$, you can see that either #1 or #7 will do the job. Again, depending on what you feel is appropriate for your answer, pick one or the other.

For me? To reduce fanout, I'll pick the ones that have constants. So #1 and #5. Here's the result:

schematic

simulate this circuit

That's it, really. Sometimes, it helps you to just lay out a useful table for the mux function.

Related Topic