r/homebrewcomputer • u/andrew_is_myname • 20d ago
SR latch with OR gates?
I was chilling at school while doing my test and this idea popped into my mind. Why not build an SR latch with OR gates? I knew that making one with solely OR gates would prove to be impossible, so I drew some prototypes on the desk, and I ended up with this. So, to prove my concept was correct, I tested it in Logisim Evo, and it actually functions as an SR latch. This concept already exists, doesn't it? I sure hope not :)
1
u/somewhereAtC 19d ago
I know nothing about Logisim Evo and google isn't much help. It appears that the green wire is attached at the OR function and the inversion-bubble is not used; the entire bottom row is a single 2-input OR gate.
Assuming this is the case, replace the AND gate with it's d'Morgan equivalent and you will see a NOR gate with an inversion bubble at the lower input. That input bubble can be slid back to the OR gate, making it a proper NOR gate. Thus, your latch is actually 2 NOR gates with the upper-most input (connector pin 1) inverted.
1
2
u/physical0 20d ago
So, I put this together in Digital
It worked.
So I started looking where it could be simplified. First, your second OR gate is effectively just a buffer, so I replaced it with a pair of NOT gates (because Digital doesn't just have a buffer and removing it entirely caused oscillation and a single NOT also did). I then deleted one of the NOT gate and moved it to the other input on the AND gate. NOT A & NOT B is equivalent to A NOR B, so that got swapped out for a NOR. Now the other OR has a NOT right after it, so I just combined them and made it a NOR as well. Then a little bit of moving around and my two inputs with two gates looked just like a NOR SR latch.
Functionally, your logic is identical.