flipflops.html 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <html>
  2. <head>
  3. <title>D/T/J-K/S-R Flip-Flop</title>
  4. </head>
  5. <body bgcolor="FFFFFF">
  6. <h1><img align="center" src="../../../icons/dFlipFlop.gif" width="32" height="32">
  7. <img align="center" src="../../../icons/tFlipFlop.gif" width="32" height="32">
  8. <img align="center" src="../../../icons/jkFlipFlop.gif" width="32" height="32">
  9. <img align="center" src="../../../icons/srFlipFlop.gif" width="32" height="32">
  10. <em>D/T/J-K/S-R Flip-Flop</em></h1>
  11. <p><table>
  12. <tr><td><strong>Library:</strong></td>
  13. <td><a href="index.html">Memory</a></td></tr>
  14. <tr><td><strong>Introduced:</strong></td>
  15. <td>2.0 Beta 1</td></tr>
  16. <tr><td valign="top"><strong>Appearance:</strong></td>
  17. <td valign="top"><img src="../../../img-libs/flipflops.png" width="225" height="43"></td></tr>
  18. </table></p>
  19. <h2>Behavior</h2>
  20. <p>Each flip-flop stores a single bit of data, which is emitted through
  21. the <var>Q</var> output on the east side. Normally, the value can be
  22. controlled via the inputs to the west side. In particular, the value
  23. changes when the <strong>clock</strong> input, marked by a triangle on
  24. each flip-flop, rises from 0 to 1 (or otherwise as configured); on this rising
  25. edge, the value changes according to the table below.</p>
  26. <center><table>
  27. <tr><th>D Flip-Flop</th>
  28. <th>T Flip-Flop</th>
  29. <th>J-K Flip-Flop</th>
  30. <th>S-R Flip-Flop</th></tr>
  31. <tr><td align="center" valign="top">
  32. <table>
  33. <tr><th><var>D</var></th><th><var>Q</var></th></tr>
  34. <tr><td align="center">0</td><td align="center">0</td></tr>
  35. <tr><td align="center">1</td><td align="center">1</td></tr>
  36. </table>
  37. </td><td align="center" valign="top">
  38. <table>
  39. <tr><th><var>T</var></th><th><var>Q</var></th></tr>
  40. <tr><td align="center">0</td><td align="center"><var>Q</var></td></tr>
  41. <tr><td align="center">1</td><td align="center"><var>Q</var>'</td></tr>
  42. </table>
  43. </td><td align="center" valign="top">
  44. <table>
  45. <tr><th><var>J</var></th><th><var>K</var></th><th><var>Q</var></th></tr>
  46. <tr><td align="center">0</td><td align="center">0</td>
  47. <td align="center"><var>Q</var></td></tr>
  48. <tr><td align="center">0</td><td align="center">1</td>
  49. <td align="center">0</td></tr>
  50. <tr><td align="center">1</td><td align="center">0</td>
  51. <td align="center">1</td></tr>
  52. <tr><td align="center">1</td><td align="center">1</td>
  53. <td align="center"><var>Q</var>'</td></tr>
  54. </table>
  55. </td><td align="center" valign="top">
  56. <table>
  57. <tr><th><var>S</var></th><th><var>R</var></th><th><var>Q</var></th></tr>
  58. <tr><td align="center">0</td><td align="center">0</td>
  59. <td align="center"><var>Q</var></td></tr>
  60. <tr><td align="center">0</td><td align="center">1</td>
  61. <td align="center">0</td></tr>
  62. <tr><td align="center">1</td><td align="center">0</td>
  63. <td align="center">1</td></tr>
  64. <tr><td align="center">1</td><td align="center">1</td>
  65. <td align="center"><em>??</em></td></tr>
  66. </table>
  67. </tr></table></center>
  68. <p>Another way of describing the different behavior of the flip-flops
  69. is in English text.</p>
  70. <ul>
  71. <li><p><strong>D Flip-Flop:</strong> When the clock triggers, the
  72. value remembered by the flip-flop becomes the value of the <var>D</var>
  73. input (<em>Data</em>) at that instant.</p></li>
  74. <li><p><strong>T Flip-Flop:</strong> When the clock triggers, the
  75. value remembered by the flip-flop either toggles or remains the same
  76. depending on whether the <var>T</var>
  77. input (<em>Toggle</em>) is 1 or 0.</p></li>
  78. <li><p><strong>J-K Flip-Flop:</strong> When the clock triggers,
  79. the value remembered by the flip-flop
  80. toggles if the <var>J</var> and <var>K</var> inputs are both 1
  81. and the value remains the same if both are 0;
  82. if they are different, then the value becomes 1 if the <var>J</var>
  83. (<em>Jump</em>) input is 1 and 0 if the <var>K</var> (<em>Kill</em>)
  84. input is 1.</p></li>
  85. <li><p><strong>S-R Flip-Flop:</strong> When the clock triggers,
  86. the value remembered by the flip-flop
  87. remains unchanged if <var>R</var> and <var>S</var> are both 0,
  88. becomes 0 if the <var>R</var> input (<em>Reset</em>) is 1, and
  89. becomes 1 if the <var>S</var> input (<em>Set</em>) is 1.
  90. The behavior in unspecified if both inputs are 1.
  91. (In Logisim, the value in the flip-flop remains unchanged.)</p></li>
  92. </ul>
  93. <p>By default, the clock triggers on a rising edge &mdash; that is, when the
  94. clock input changes from 0 to 1. However, the
  95. Trigger attribute allows this to change to a falling edge (when the clock
  96. input changes from 1 to 0), a high level (for the duration that the clock input
  97. is 1), or a low level (for the duration that the clock input is 0). The
  98. level-trigger options are unavailable for the T and J-K flip-flops, because
  99. a flip-flop behaves unpredictably when told to toggle for an indeterminate
  100. amount of time.</p>
  101. <h2>Pins</h2>
  102. <dl>
  103. <dt>West edge, marked by triangle (input, bit width 1)</dt>
  104. <dd>Clock input: At the instant that this input value switches from 0 to
  105. 1 (the rising edge), the value will be updated according to the other
  106. inputs on the west edge. As long as this remains 0 or 1, the other
  107. inputs on the west edge have no effect.</dd>
  108. <dt>West edge, other labeled pin(s) (input(s), bit width 1)</dt>
  109. <dd>These inputs control how the flip-flop's value changes during the
  110. rising edge of the clock. Their exact behavior depends on the
  111. flip-flop; the above tables summarize their behavior.</dd>
  112. <dt>East edge, labeled <var>Q</var>, north end (output, bit width 1)</dt>
  113. <dd>Outputs the value currently stored by the flip-flop.</dd>
  114. <dt>East edge, south end (output, bit width 1)</dt>
  115. <dd>Outputs the complement of the value currently stored by the
  116. flip-flop.</dd>
  117. <dt>South edge, east end (input, bit width 1)</dt>
  118. <dd>Asynchronous reset: When 0 or undefined, this input has no effect.
  119. As long as it is 1, the flip-flop's value is pinned to 0. This occurs
  120. asynchronously - that is, without regard to the current clock input
  121. value. As long as this is 1, the other inputs have no effect.</dd>
  122. <dt>South edge, center end (input, bit width 1)</dt>
  123. <dd>Enable: When this is 0, clock triggers are ignored. The current bit
  124. continues to appear on the output. The clock triggers are enabled when this
  125. input is 1 or undefined.</dd>
  126. <dt>South edge, west end (input, bit width 1)</dt>
  127. <dd>Asynchronous set: When 1 or undefined, this input has no effect.
  128. When 1, the flip-flop's value is pinned to 1. This occurs asynchronously
  129. - that is, without regard to the current clock input value. As long as
  130. this input is 1, the other inputs have no effect, except for the
  131. asynchronous reset input, which has priority.</dd>
  132. </dl>
  133. <h2>Attributes</h2>
  134. <dl>
  135. <dt>Trigger</dt>
  136. <dd>Configures how the clock input is interpreted. The value <q>rising edge</q>
  137. indicates that the flip-flop should update its value at the instant when the
  138. clock rises from 0 to 1. The <q>falling edge</q> value indicates that it should
  139. update at the instant the clock falls from 1 to 0. The <q>high level</q> value
  140. indicates that the flip-flop should update continuously whenever the clock
  141. input is 1. And the <q>low level</q> value indicates that it should update
  142. continuously when the clock input is 0. Note that the latter two options
  143. are unavailable for T and J-K flip-flops.</dd>
  144. <dt>Label</dt>
  145. <dd>The text within the label associated with the flip-flop.</dd>
  146. <dt>Label Font</dt>
  147. <dd>The font with which to render the label.</dd>
  148. </dl>
  149. <h2>Poke Tool Behavior</h2>
  150. <p>Clicking a flip-flop using the Poke Tool toggles the bit stored in
  151. the flip-flop, unless the asynchronous set/reset inputs currently
  152. pin the flip-flop's value.</p>
  153. <h2>Text Tool Behavior</h2>
  154. <p>Allows the label associated with the component to be edited.</p>
  155. <p><a href="../index.html">Back to <em>Library Reference</em></a></p>
  156. </body>
  157. </html>