# SR NAND latch

When using static gates as building blocks, the most fundamental latch is the simple SR latch, where S and R stand for set and reset. It can be constructed from a pair of cross-coupled NOR or NAND logic gates. The stored bit is present on the output marked Q.

The circuit shown below is a basic NAND latch. The inputs are generally designated S and R for Set and Reset respectively. Because the NAND inputs must normally be logic 1 to avoid affecting the latching action, the inputs are considered to be inverted in this circuit (or active low).

The circuit uses feedback to "remember" and retain its logical state even after the controlling input signals have changed. When the S and R inputs are both high, feedback maintains the Q outputs to the previous state.

The truth table and diagram

The R = S = 0 combination is called a restricted combination or a forbidden state because, as both NAND gates then output 1s, it breaks the logical equation Q = not Q. The combination is also inappropriate in circuits where both inputs may go high simultaneously (i.e. a transition from restricted to keep). The output would lock at either 1 or 0 depending on the propagation time relations between the gates (a race condition). In certain implementations, it could also lead to longer ringings (damped oscillations) before the output settles, and thereby result in undetermined values

### Notes

• The green switch is a on/off switch (similar to a room light switch).
• Q0 is the previous state of Q and Q0 is the previous state of Q.
• R and S are asynchronous inputs - that is the output responds to these input immediately. They are active low inputs. Click on their respective green switches and observe.
• S sets the output to 1 and R resets the output to 0.
• Both R and S cannot be low at the same time - the output is undefined.
• Simulate and Breadboard the SR NAND circuit.
• Watch the video to learn how to edit the input (thick) waveforms.

With advertising revenues falling despite increasing numbers of visitors, we need your help to maintain and improve this site, which takes time, money and hard work. Thanks to the generosity of our visitors who gave earlier, you are able to use this site at no charge.

If you have benefited from this site and are able, please give \$10 via Paypal. It will allow us continue into the future. It only takes a minute. Thanks!