In our previous lesson, we learned that connecting an output back to an input creates a feedback loop. This loop allows a circuit to "remember" a state. However, a simple loop isn't very useful if we can't change the value it is holding. To build a real computer, we need a way to "write" a new value into memory and "erase" it when we are done.
The SR Latch is one of the most basic types of digital memory. The S stands for Set (making the value 1), and the R stands for Reset (making the value 0). By using two logic gates together, we can create a circuit that stays in a specific state until we tell it to change.
Before we look at the whole circuit, let's quickly remember how a NOR gate works. A NOR gate is essentially an OR gate with an inverter at the end.
The rule for a NOR gate is simple: it outputs a 1 only if both inputs are 0. If even one input is a 1, the output immediately becomes 0.
To make an SR Latch, we connect two NOR gates in a cross-coupled pattern. This means the output of the top gate is wired to one of the inputs of the bottom gate. Similarly, the output of the bottom gate is wired back to one of the inputs of the top gate.

This creates a criss-cross shape in the middle of the circuit. In a standard setup:
- The top
gateprovides the mainoutput, which we call Q. - The bottom
gateprovides the oppositeoutput, called Not-Q. - In a healthy
circuit, these twooutputsshould always be opposites. If is , should be .
The "magic" happens when we use the two remaining inputs to control the circuit. Let's look at how we change the stored bit.
The Reset Action (R=1, S=0)
When you turn the Reset input to 1, the top NOR gate sees a 1. Because of how NOR gates work, any 1 input forces the output to 0. Therefore, Q becomes 0. This 0 travels down to the bottom gate. Since the Set input is 0 and the feedback from Q is now 0, the bottom sees two s and outputs a . So, becomes .
The most important feature of the SR Latch is the Hold State. This happens when both the Set and Reset inputs are 0.
Imagine you just used the Set input to make . If you now turn the Set input back to 0, what happens?
- The bottom
gatestill receives a1from the topgate(Q). - Because it sees a
1, the bottomgatekeeps outputting a0.
There is one combination of inputs that we must avoid: turning both Set and Reset to 1 at the same time ().
In this state, both NOR gates see a 1. This forces both Q and Not-Q to become 0. This is called an Invalid State because Q and are supposed to be opposites.
You have now learned how to build a basic memory cell using two NOR gates. Here is a summary of the SR Latch behavior:
