Difference between revisions of "SR Latch"

From Coder Merlin
(Created page with "(image on right) == Prerequisites == == Background == (Use when required for background reading) == Introduction == == Topic Headers == == Key Concepts == == Exercises == == R...")
 
Line 1: Line 1:
(image on right)
[[File:Gate latch.jpg|thumb|Gate latch]]
== Prerequisites ==
== Prerequisites ==
* [[W1013 Boolean Algebra]]
* [[W1014 Logic Gates]]
* [[W1016 Logic Composition]]
== Background ==
== Background ==
(Use when required for background reading)
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 ==
== Introduction ==
== Topic Headers ==
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 ==
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 <math>Q</math> high; the second is labeled '''reset''' (or just ''R''); its role is to reset the output <math>Q</math> to make it low.  <math>\overline{Q}</math> will always be the negated value of <math>Q</math>.  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 <math>Q</math> at time ''t'', <math>Q_t</math>, will be equal to the value at time ''t''-1, <math>Q_{t-1}</math>. 
{| class="wikitable"
! Reset
! Set
! State
! <math>Q_t</math>
! <math>\overline{Q_t}</math>
|-
| 0 || 0 || Latch || <math>Q_{t-1}</math> ||  <math>\overline{Q_{t-1}}</math>
|-
| 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: 
 
[[File:RS Flip-flop (NOR).svg|RS Flip-flop (NOR)]]
 
== Key Concepts ==
== Key Concepts ==
== Exercises ==
== Exercises ==
{{W1018-Exercises}}
== References ==
== References ==
* [https://en.wikibooks.org/wiki/Digital_Circuits/Latches Latches] (Wikibooks)

Revision as of 21:08, 5 October 2019

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)

Key Concepts[edit]

Exercises[edit]

Template:W1018-Exercises

References[edit]