# The S-R Latch – Construct Digital Circuits

The S-R latch is a key circuit in digital storage items. On this tutorial, you’ll be taught the way it works, its fact desk, and how one can construct one with completely different logic gates.

## What’s an S-R Latch?

Earlier than beginning with the S-R latch it’s good to know what a latch is. A latch is an asynchronous circuit (it doesn’t require a clock sign to work), and it has two secure states, HIGH (“1”) and LOW (“0”), that can be utilized for storing binary information. Many sequential circuits and bigger storage units, equivalent to shift registers, use latches as their principal constructing block.

The only latch is the Set-Reset (S-R) latch. You’ll be able to construct one by connecting two NOR gates with a cross-feedback loop.

This suggestions path is essential to storing one bit of information so long as the circuit is powered. On this circuit, the higher gate has the S enter and the primary output Q, whereas the decrease gate has the R enter and the inverted output Q̅.

## How does the S-R Latch work?

To start with, let’s outline the reality desk of the S-R latch:

Now, let’s analyze how the S-R latch works utilizing its fact desk and its circuit with NOR gates. Do not forget that the NOR gate solely provides “1” when each inputs are “0”, with some other enter mixture the output is “0”.

You’ll be able to see within the fact desk that when each inputs S and R are equal to “0”, the output Q stays the identical because it was. That is the reminiscence operate of the S-R latch as a result of it saves the earlier worth. Suppose the Q output is “1” within the current state. Should you now place each inputs in “0”, then the output will stay “1” as follows:

Then, how would you “Reset” the Q output to “0”? Properly, as you possibly can see within the fact desk, you want a “1” within the R enter and a “0” within the S enter.

However, if you wish to “Set” a “1” within the Q output simply comply with the reality desk and place a “1” within the S enter and a “0” within the R enter.

Lastly, the S and R inputs ought to by no means be “1” on the identical time as a result of the NOR gate solely provides “1” when each of its inputs are “0”, but when one enter is “1”, then the output will likely be “0”. Consequently, if S and R are “1”, each latches’ outputs will likely be “0” on the identical time, one thing that violates this latch’s working precept.

## SR-LATCH WITH NAND GATES

The S-R Latch will also be constructed utilizing two NAND gates:

Within the above circuit, you may need seen slight variations from the one with NOR gates. Now the inputs have been swapped, with the S enter within the higher gate and the R enter within the decrease gate. As well as, the inputs have been negated.

It really works the identical method as with NOR gates, simply that the inputs are inverted. Right here’s the reality desk:

## Instance Circuit

As a sensible instance, you possibly can construct an SR latch utilizing the CD4001 chip. Beneath you possibly can see how the CD4001 has 4 NOR gates inside, making it ultimate for this sort of utility.

The circuit works as follows: when the button PB2 is pushed, the LED L2 activates and stays on even after PB2 is launched, whereas the LED L1 stays off. LED L2 turns off when the button PB1 is pressed, whereas LED L1 turns and stays on even after PB1 has been launched. To assemble the above circuit you want:

• The CD4001 chip
• Two push buttons (PB1 and PB2)
• Two LEDs
• Two 10 kΩ resistors (R1 and R2)
• Two 330 Ω resistors (R3 and R4)

## Questions?

Do you may have any questions on S-R Latch? Let me know within the feedback under.