# NOR gate implemented with 2 relays, schematic with 2 NOR gates with feedback loop

You have two NOR gates here, on the left side highlighted in yellow and on the right hand side highlighted in pink.

Each NOR gate is implemented using two relays.

In the yellow NOR gate, what is the value of the first input (fed in from the output) and why?

My thoughts were that the relays for both NOR gates have voltage flowing and because there is no "out" yet and therefore no "in" either, the voltage flows from the pink NOR gate as the output. And then is used as input. Which means that the "out" is a 1 and the "in" is a 1 also.

But I know I am wrong, because the book I'm reading ("Code" by Charles Petzold) says both inputs are 0 to the left gate, but leaves out why.

• Are you sure that the book is not just assuming that both inputs to the left gate are 0? How is the statement worded exactly? Jul 26, 2021 at 0:34
• It says "At the outset, the only current flowing in this circuit is from the output of the left NOR gate. That's because both inputs to that gate are 0. " Its from Charles Petzold's book "Code."
– Masu
Jul 26, 2021 at 0:36
• The inputs he's talking about is the top "in" which is being fed from output," and the other open switch which is a 0.
– Masu
Jul 26, 2021 at 0:38
• But in your sketch current is flowing into the top input of the left gate... Jul 26, 2021 at 0:44
• @Masu You should go read this PDF page on relay computer design. It's worth the effort. You'll see an inverter, an OR, and so on there. All fully functional because Dr. Porter built a computer based up this single relay element. His overview page is here.
– jonk
Jul 26, 2021 at 8:44

## 2 Answers

This is an active low (Open switches) S + R latch with priority on the pink R input if both switches are closed. The yellow input is Set while the pink input is Reset. This is due to the positive feedback (double inversion from 2 NOR’s)

If both switches are closed (0) the last switch to open determines if the output stays in reset or gets set.

• the question i have is how does the input in the left gate get initialized, or how does the network of relays get initialized?
– Masu
Jul 26, 2021 at 2:00
• The last switch to open initializes it to Set (yellow) or Reset(pink) then either S/R controls by close =1 Jul 26, 2021 at 2:36

Drawing it in the form of a ladder diagram, and where the circles represent coils, it has a race condition on start-up.

If red-upper coil gets energized first, then the light will be off. If yellow upper gets turned on first, then red-upper coil will not be energized and the light will be on. When the light is on, pressing the push-button labeled "Red" will disconnect the electrical pathway to both the light and the yellow-upper coil. This is your reset button then. Tracing the wiring, the yellow push-button causes the light to turn on, and so is the set button.

So, this is a convoluted way of making an S-R latch.