A gated SR latch adds an enable E to the basic SR latch. Two AND gates sit in front, so the inner latch sees and .
- E = 0: both inner inputs are 0, so the latch holds, whatever S and R do.
- E = 1: the latch behaves like a plain SR latch: set, reset or hold.
This lets you choose when the latch may change. The enable is often driven by a clock, which is why it is sometimes called a clocked SR latch. It is still level sensitive: while E = 1, every change on S or R shows through immediately.
It keeps the SR latch's forbidden input: with E = 1, S = R = 1 forces both outputs to 0.
The gated D latch is the fix. Drive S with D and R with , so the inner signals become and . They can never both be 1, and there is now just one data input.
A gated SR latch's next state is Q⁺ = , valid when S and R are never both 1 while E = 1.