Implement 3 2-input mux with 2 select inputs on breadboard

Thread Starter

dinkofelic23

Joined Nov 28, 2020
43
Hi, I am trying to make this circuit:

Skärmavbild 2020-11-28 kl. 11.23.06.png
Unfortunately, in my lab-kit I only have access to Quad 2-input multiplexor (SN74HC157) and a 8-input multiplexor (SN74HC151). The circuit works fine in Logisim, but the I noticed that the SN74HC157 only has 1 select input, and I need to have 2 select input as shown in the circuit. Is it possible to implement this in some clever way?

The boolean function I have is the following:
Skärmavbild 2020-11-28 kl. 11.27.40.png
Hope this is sufficient information. Thank you in advance.
 

WBahn

Joined Mar 31, 2012
29,976
It's unclear what your goal and constraints are.

You you tasked with implementing that four-input function using only the devices available within some kit? Or are you required to use multiplexers?
 

Thread Starter

dinkofelic23

Joined Nov 28, 2020
43
I am not required to use multiplexors. I am free to use any gates in the lab kit to implement the Boolean function above.
Skärmavbild 2020-11-28 kl. 12.17.24.pngSkärmavbild 2020-11-28 kl. 12.17.29.png
This is what is in my lab-kit, and I thought that using a mux would be clever...
 

WBahn

Joined Mar 31, 2012
29,976
How MANY of those things do you have? If you have enough NAND gates, you can implement any Boolean circuit. Alternatively, you could use two of your '157 2-input MUX chips provided that your kit has at least two of them. You could also use the '157 for the first two muxes and then build the final mux using more primitive gates. Lots of options. Which ones are feasible depends on what the limits are that you have to work under.
 

Thread Starter

dinkofelic23

Joined Nov 28, 2020
43
Alright, thank you. I only have one of each gate. That was the problem I ran into, that I needed two muxes because of the two signal inputs. I'll try what you said, first using the 157 and then primitive gates for the last mux.
Skärmavbild 2020-11-28 kl. 12.50.31.png
This one. If my understanding is correct, is it equivalent to this?
Skärmavbild 2020-11-28 kl. 12.52.04.png
 

WBahn

Joined Mar 31, 2012
29,976
Yes. Note that that can be implemented using a since quad NAND gate package. Give the parts that you have available, that might not be the best way to go, however.
 

Thread Starter

dinkofelic23

Joined Nov 28, 2020
43
Okey, this starts to get a bit overly complicated. Do you have any advice how to approach this problem?
When I allow Logisim create the circuit for me it needs quite a lot of gates. Skärmavbild 2020-11-28 kl. 12.57.02.png
More gates than I have in the kit... Therefor I tried to minimize it using muxes but ran into that problem mentioned firsthand.
 

WBahn

Joined Mar 31, 2012
29,976
You can implement this logic circuit using just two parts from your kit.

Let's consider a simpler circuit.

A B Y
0 0 1
0 1 0
1 0 1
1 1 1

Now take a two-input MUX and connect A to the select input. Tie the D1 input HI and put the B input through a NOT gate before connecting it to the D0 input.

Assuming I've done this right in my head, what is the truth table of the resulting circuit?

Do you see how I can use one 2-input MUX and one NOT gate to implement ANY Boolean function of two variable?
 

WBahn

Joined Mar 31, 2012
29,976
When I allow Logisim create the circuit for me it needs quite a lot of gates.
I strongly recommend that you NOT fall into the trap of letting Logisim (or any other tool) do your work for you unless and until you are confident you could do it on your own without the tool. That way the tool is being used to perform the grunt work and not to do your thinking for you.
 

Thread Starter

dinkofelic23

Joined Nov 28, 2020
43
You can implement this logic circuit using just two parts from your kit.

Let's consider a simpler circuit.

A B Y
0 0 1
0 1 0
1 0 1
1 1 1

Now take a two-input MUX and connect A to the select input. Tie the D1 input HI and put the B input through a NOT gate before connecting it to the D0 input.

Assuming I've done this right in my head, what is the truth table of the resulting circuit?

Do you see how I can use one 2-input MUX and one NOT gate to implement ANY Boolean function of two variable?
Wow, that was smooth, drew it out on paper and I get the same truth table. I suspect that I will face the same issue as before, that I need 2 select inputs because I got 4 variables to deal with. And in my lab kit I am constrained to having a mux with only one select input.
 

Thread Starter

dinkofelic23

Joined Nov 28, 2020
43
hi 123,
Logism solves the logic in this way, it does not consider that the Inverters could be minimised.
Look how the inverter count could be reduced.

E
I see, in the K-map above, Logisim has already reduced those inverters if I'm not mistaken. Perhaps I'm missing your point, can you elaborate?
 

WBahn

Joined Mar 31, 2012
29,976
Wow, that was smooth, drew it out on paper and I get the same truth table. I suspect that I will face the same issue as before, that I need 2 select inputs because I got 4 variables to deal with. And in my lab kit I am constrained to having a mux with only one select input.
How many select inputs does a 74HC151 have?
 

WBahn

Joined Mar 31, 2012
29,976
I see, in the K-map above, Logisim has already reduced those inverters if I'm not mistaken. Perhaps I'm missing your point, can you elaborate?
The diagram you posted (Post #7) has eleven inverters. You need at most four.

Plus, that diagram uses parts that are not in your kit.
 

Thread Starter

dinkofelic23

Joined Nov 28, 2020
43
How many select inputs does a 74HC151 have?
It has 3 select input, is it possible to use that one instead you mean? Leave one select input and 4 inputs unused?
Perhaps that will solve everything, instead of using 3 2-to-1 mux, simply use 8-to-1 mux? (did not know you could do this if possible...)
 

WBahn

Joined Mar 31, 2012
29,976
It has 3 select input, is it possible to use that one instead you mean? Leave one select input and 4 inputs unused?
Perhaps that will solve everything, instead of using 3 2-to-1 mux, simply use 8-to-1 mux? (did not know you could do this if possible...)
You could do something like that, but you can do the whole thing using that 8:1 mux and a single NOT gate. Nothing else needed. Focus on understanding why I am able to implement ANY Boolean function of two variables using a single 2:1 much and a single NOT gate.
 

djsfantasi

Joined Apr 11, 2010
9,156
It has 3 select input, is it possible to use that one instead you mean? Leave one select input and 4 inputs unused?
Perhaps that will solve everything, instead of using 3 2-to-1 mux, simply use 8-to-1 mux? (did not know you could do this if possible...)
It’s possible. But you don’t want to leave any inputs “unused”. Tie then to Vcc or Ground. For example, if the third input is grounded, which of the 8 inputs can be used? You’ll find that the answer is 4 inputs. Then, you have a 4 to 1 mux... (still tie the unused inputs to ground or Vcc).
 

Thread Starter

dinkofelic23

Joined Nov 28, 2020
43
It’s possible. But you don’t want to leave any inputs “unused”. Tie then to Vcc or Ground. For example, if the third input is grounded, which of the 8 inputs can be used? You’ll find that the answer is 4 inputs. Then, you have a 4 to 1 mux... (still tie the unused inputs to ground or Vcc).
Clever! I'll try it out. Thank you very much, kind fellow human. I will let you know how it goes later.
 
Top