Ok, so I'm relatively new to electrical engineering having worked on the software side of life in the past. I'm trying to work a simple SR Latch where only one output is enabled at once. To do this, I've tried resetting the whole latch with each button press (connected to the screw terminals in my diagram).

Unfortunately I've come across the issue of triggering the set lines at the same time. I've fixed this with diodes but now have the problem where I'm triggering both the reset line and the set line at the same time on whichever button I press. This obviously causes invalid states and completely unpredictable behaviour.

How can I reset the whole SR Latch whilst still being able to set one output high after? I thought about using capacitors on each set line but I'm thinking I'm probably missing something obvious with logic gates here.

Diagram of SR Latch

  • 1
    \$\begingroup\$ To be clear: the behavior you want is for the first high input to assert its corresponding output high and leave it high until a different input goes high? What do you want to happen if the first input is high but a second input also goes high? Or if the first input goes low while the second input is still high? \$\endgroup\$
    – vir
    Commented May 24, 2023 at 21:52

1 Answer 1


What you want is called a "radio button circuit". Like the pushbutton tuning on old car radios, when you press any button, that button's signal is selected and all other signals are blocked. In your case each of the four buttons sets its own flipflop, while resetting all other flipflops.

If you agree with all of that, you can search for radio button circuits and schematics. You will see that a 4-button circuit cannot be done with only one logic package (not counting a microcontroller).

The basic approach is for each ff to have one set input from its button, and three reset inputs from the other three buttons through a 3-input OR gate. There are four, 3-input OR gates, one for each ff. Each flipflop's OR gate has inputs from the other three buttons

Three-input OR gates come three to a package, so that's two more packages. There are diode-OR tricks you can use to reduce the package count.

Note: I keep saying OR gate, but you might have to use NOR gates, depending on the logic polarity of your flipflops.

  • \$\begingroup\$ Thanks for your answer. I see what you mean. Having googled radio button circuits, they seem like what I'm after. I think for simplicity's sake however it would probably make more sense just using a cheap microcontroller here? \$\endgroup\$
    – AQMS
    Commented May 25, 2023 at 9:44
  • \$\begingroup\$ If you already have programming experience and a programmer, sure. It will fit in an 8-pin PIC or whatever for about $1. A random-logic solution might have a lower parts cost, but a higher assembly time. \$\endgroup\$
    – AnalogKid
    Commented May 25, 2023 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.