I have designed a circuit that takes input from a 2 bit DIP switch, and uses that data to address one of 4, 4 bit DIP switches. The output of the selected 4 bit DIP switch feeds into 4 LEDs. Here is my schematic:

(The yellow squares are there to show individual DIP switches).
The circuit uses a 4 to 16 line decoder (the 74ls154) and a hex inverter (the 74ls04). Here are the pin outs (for those who need them):

The circuit "selects" which DIP switch's value is outputted to the LEDs by only supplying +5v to one, 4 bit switch at a time, the one addressed by the 2 bit DIP switch. The 2 bit switch is connected to the two least significant bits of the decoder's 4 bit input, and the decoder's lower 4 outputs connect to the hex inverter (because the decoder's outputs are inverted). Each of the four outputs (now reverted to their correct state) then feed into the 4 bit DIP switches. Each output connects to all 4 of their individual DIP switch's inputs. The output of bit 1 of every switch is connected to the first LED. The output of bit 2 of every switch is connected to the second LED. The output of bit 3 of every switch is connected to the third LED. And the output of bit 4 of every switch is connected to the fourth LED.
Why am I using 4 to 16 line decoder when I should be using a 2 to 4? Well, I do plan on using all the inputs and outputs in my final circuit, but for the sake of simplicity, I only used 2 inputs and 4 outputs here. Plus, the number of inputs/outputs used is irrelevant, the question is:
All of the first bits of every switch are connected, and all of the second bits of every switch are connected and the third bits, and fourth - basically there are four master lines (which connect to the LEDs) each with four "mini" lines of their own (connected the 4 bit DIP switch outputs). At most one, and at least zero of the "mini" lines will be high at any given time (depending on what switch is selected, and whether the bit on the selected switch that the master line corresponds to is high). When none of the "mini" lines are high, the master line is low and the LED does not light, no problem. But what about when one "mini" line is high, and the other three are low?
Will this create some sort of conflict, almost like bus contention? Is this what bus contention is? Theoretically (to me at least lol), because 1+0+0+0=1, there should be no problem, the master line will go high and the LED will light. But am I missing something? If so, what can I do to solve the problem?

(The yellow squares are there to show individual DIP switches).
The circuit uses a 4 to 16 line decoder (the 74ls154) and a hex inverter (the 74ls04). Here are the pin outs (for those who need them):


The circuit "selects" which DIP switch's value is outputted to the LEDs by only supplying +5v to one, 4 bit switch at a time, the one addressed by the 2 bit DIP switch. The 2 bit switch is connected to the two least significant bits of the decoder's 4 bit input, and the decoder's lower 4 outputs connect to the hex inverter (because the decoder's outputs are inverted). Each of the four outputs (now reverted to their correct state) then feed into the 4 bit DIP switches. Each output connects to all 4 of their individual DIP switch's inputs. The output of bit 1 of every switch is connected to the first LED. The output of bit 2 of every switch is connected to the second LED. The output of bit 3 of every switch is connected to the third LED. And the output of bit 4 of every switch is connected to the fourth LED.
Why am I using 4 to 16 line decoder when I should be using a 2 to 4? Well, I do plan on using all the inputs and outputs in my final circuit, but for the sake of simplicity, I only used 2 inputs and 4 outputs here. Plus, the number of inputs/outputs used is irrelevant, the question is:
All of the first bits of every switch are connected, and all of the second bits of every switch are connected and the third bits, and fourth - basically there are four master lines (which connect to the LEDs) each with four "mini" lines of their own (connected the 4 bit DIP switch outputs). At most one, and at least zero of the "mini" lines will be high at any given time (depending on what switch is selected, and whether the bit on the selected switch that the master line corresponds to is high). When none of the "mini" lines are high, the master line is low and the LED does not light, no problem. But what about when one "mini" line is high, and the other three are low?
Will this create some sort of conflict, almost like bus contention? Is this what bus contention is? Theoretically (to me at least lol), because 1+0+0+0=1, there should be no problem, the master line will go high and the LED will light. But am I missing something? If so, what can I do to solve the problem?
Last edited: