Skip to main content
Workforce LibreTexts

7.5: NAND Gate S-R Flip-Flop

  • Page ID
    1282
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    PARTS AND MATERIALS

    • 4011 quad NAND gate (Radio Shack catalog # 276-2411)
    • 4001 quad NOR gate (Radio Shack catalog # 276-2401)
    • Eight-position DIP switch (Radio Shack catalog # 275-1301)
    • Ten-segment bar graph LED (Radio Shack catalog # 276-081)
    • One 6 volt battery
    • Three 10 kΩ resistors
    • Two 470 Ω resistors

    Caution! The 4011 IC is CMOS, and therefore sensitive to static electricity! Although the parts list calls for a ten-segment LED unit, the illustration shows two individual LEDs being used instead. This is due to lack of room on my breadboard to mount the switch assembly, two integrated circuits, and the bar graph. If you have room on your breadboard, feel free to use the bar graph as called for in the parts list, and as shown in prior latch circuits.

    CROSS-REFERENCES

    Lessons In Electric Circuits, Volume 4, chapter 3: “Logic Gates”

    Lessons In Electric Circuits, Volume 4, chapter 10: “Multivibrators”

    LEARNING OBJECTIVES

    • The difference between a gated latch and a flip-flop
    • How to build a “pulse detector” circuit
    • Learn the effects of switch contact “bounce” on digital circuits

    SCHEMATIC DIAGRAM

    05303.png

    ILLUSTRATION

    05304.png

    INSTRUCTIONS

    The only difference between a gated (or enabled) latch and a flip-flop is that a flip-flop is enabled only on the rising or falling edge of a “clock” signal, rather than for the entire duration of a “high” enable signal. Converting an enabled latch into a flip-flop simply requires that a “pulse detector” circuit be added to the Enable input so that the edge of a clock pulse generates a brief “high” Enable pulse:

    05305.png

    The single NOR gate and three inverter gates create this effect by exploiting the propagation delay time of multiple, cascaded gates. In this experiment, I use three NOR gates with paralleled inputs to create three inverters, thus using all four NOR gates of a 4001 integrated circuit:

    05306.png

    Normally, when using a NOR gate as an inverter, one input would be grounded while the other acts as the inverter input, to minimize input capacitance and increase speed. Here, however, slow response is desired, and so I parallel the NOR inputs to make inverters rather than use the more conventional method. Please note that this particular pulse detector circuit produces a “high” output pulse at every falling edge of the clock (input) signal. This means that the flip-flop circuit should be responsive to the Set and Reset input states only when the middle switch is moved from “on” to “off,” not from “off” to “on.”

    When you build this circuit, though, you may discover that the outputs respond to Set and Reset input signals during both transitions of the Clock input, not just when it is switched from a “high” state to a “low” state. The reason for this is contact bounce: the effect of a mechanical switch rapidly making-and-breaking when its contacts are first closed, due to the elastic collision of the metal contact pads. Instead of the Clock switch producing a single, clean low-to-high signal transition when closed, there will most likely be several low-high-low “cycles” as the contact pads “bounce” upon off-to-on actuation. The first high-to-low transition caused by bouncing will trigger the pulse detector circuit, enabling the S-R latch for that moment in time, making it responsive to the Set and Reset inputs. Ideally, of course, switches are perfect and bounce-free. In the real world, though, contact bounce is a very common problem for digital gate circuits operated by switch inputs and must be understood well if it is to be overcome.


    This page titled 7.5: NAND Gate S-R Flip-Flop is shared under a GNU Free Documentation License 1.3 license and was authored, remixed, and/or curated by Tony R. Kuphaldt (All About Circuits) via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.

    • Was this article helpful?