SR Latch

From Coder Merlin
Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder
Gate latch

Prerequisites[edit]

Background[edit]

Our memory enables us to remember an event after the original stimulus is gone. A latch is a device used to fasten something into place. In the case of an SR Latch, the role is to latch a single, binary digit enabling it to remember a value even after the original value (stimulus) is no longer present.

Introduction[edit]

We've learned a lot about Boolean algebra and logic gates and how composition enables us to construct complex functionality from simple components. However, all functionality which we've considered so far presents an instantaneous value for output based upon the current input values. One of the most basic requirements of a computer is an ability to remember (or store) values for later use. This experience will describe one means of storing values by building a latch out of the logic gates with which we are already familiar.

The SR Latch[edit]

An SR Latch is able to capture its input value and preserve that value for use at a later time. An SR Latch has two inputs: The first is labeled set (or just S); its role is to set the output high; the second is labeled reset (or just R); its role is to reset the output to make it low. will always be the negated value of . The interesting aspect of a latch, however, is that when we set both set and reset to low. In this case, the latch will hold the previous value, i.e. the new value of at time t, , will be equal to the value at time t-1, .

Reset Set State
0 0 Latch
0 1 Set 1 0
1 0 Reset 0 1
1 1 Forbidden undefined undefined

An SR Latch may be easily constructed using two NOR gates:

RS Flip-flop (NOR)

SR Latch Graph[edit]

Carefully consider the following SR Latch graph:
SR Latch Graph.png
The x-axis indicates the time, in milliseconds, progressing rightward. The y-axis indicates the voltage, individually, for S (Set), R (Reset), and Q (output). In table form, this would appear as:

Time (ms) S (Set) R (Reset) (Output)
0 H L H
10 L L H
20 L L H
30 L H L
40 L H L
50 L L L
60 L L L
70 H L H
80 L L H
90 L L H
100 L L H

Key Concepts[edit]

Exercises[edit]

Template:W1018-Exercises

References[edit]