# Replacing a logic OR gate with two diodes

I am trying to build some basic circuits to figure out how things work (mostly for fun). This one caught me off-guard today.

I want to build a module with three pushbuttons. Each one turns its own LED on and switches two other LEDs off. Initially I made a little simulation in Circuit JS:

I haven't tried actually building it, but I presume it works. So the idea is that each pushbutton activates two "reset" inputs of other buttons' NOR latches.

I thought to simplify this circuit by using diodes instead of OR gates. However, when I changed one gate, I got the following:

Why so? I fail to understand how voltage can make it through the upper diode. Initially I thought that even a resistor and a ground connection isn't necessary in this case, and I can simply connect two diodes to a NOR latch. However, it seems that even a "proper" diode OR won't work here.

(Of course, maybe Circuit JS is just tricking me, but I trust it more than my knowledge in this case).

UPDATE. Thanks to TimWescott I made it work on a simulator. It seems that additional pulldown resistors were necessary. Here is the final build.

• It looks like the tool is modeling real diodes and ideal gates, or possibly CMOS gates. Real diodes will conduct in reverse, somewhat -- without pull-down resistors on the anodes of the diodes, you may end up getting what you're seeing. Try putting $100mathrm{k\Omega}$ or even $1\mathrm{M\Omega}$ resistors from the diode anodes to ground, and see what happens. Commented Apr 19, 2021 at 14:40
• Thank you. I tried, but no difference. Also it shows that voltage behind the upper diode is almost 5V. However, do you think that the circuit should work OK in reality, and I should try building it for real? -- Oh, I am sorry, you said 'anodes' -- yes, it looks it did the trick! Commented Apr 19, 2021 at 15:04
• As a service to future StackExchange users, please either edit your question to show what works (and I'll answer it), or answer your question with the schematic of what works, with that explanation about diodes leaking. Commented Apr 19, 2021 at 15:36
(Note that you've left the 100$$\\mathrm{k\Omega}\$$ pull-down resistors off of the path with the closed switch -- that'll bite you as soon as you open it and close one of the others).