The latch is a electronic circuit used to store information in asynchronous sequential logic systems. One latch can store one bit of information. Latches often occur in multiples, some of which have special names, such as the 'quad latch' (which can store four bits) and the 'octal latch' (eight bits).
SR latch
The simplest latch is the SR latch, where S and R stand for 'set' and 'reset'. The latch is constructed from a pair of cross-coupled NAND (negative AND) logic gates. The stored bit is present on the output marked Q.
Normally, in storage mode, the
and
inputs are both high, and feedback maintains the Q and
outputs in a constant state, with
the complement of Q. If
(set) is pulsed low while
is held high, then the Q output is forced high, and stays high when
returns high. On the other hand, if
(reset) is pulsed low while
is held high, then the Q output is forced low, and stays low when
returns high. The output of the latch cannot be predicted if
and
are brought low at the same time, so this condition must be avoided.
See also