Application of Flip Flops

💡
Key learnings:
  • Flip Flop Definition: A flip flop is a basic digital memory circuit that stores one bit of data and can be used in various applications by connecting multiple flip-flops.
  • Registers and Shift Registers: Registers store multiple bits of data using flip-flops, while shift registers move data within or out of registers based on clock pulses.
  • Counters: Flip-flops form counters that count events and can be designed in various ways to suit specific counting needs.
  • Event Detection: Flip-flops can detect events by changing states and holding the new state until the event is cleared.
  • Frequency Division: Flip-flops can divide input frequencies by toggling their output states, effectively reducing the frequency by half for each flip-flop stage.

Registers

Flip-flops are used wherever a circuit must store bits, count events, catch a pulse, align data to a clock or divide a frequency. A register is the simplest of those uses: each flip-flop stores one bit, so n flip-flops store n bits. Three D flip-flops hold B3, B2 and B1 and form a 3-bit buffer register.

application of flip flops
Clock pulses can move the stored bits from stage to stage, or in and out of the register. That circuit is a shift register. The data path may be serial-in serial-out, serial-in parallel-out, parallel-in serial-out or parallel-in parallel-out. The shift may be left, right or both, as in Figure 2.

application of flip flops

Counters

A counter is a chain of flip-flops (JK, D or T) wired to count events. One flip-flop has two states, 0 and 1, so it is a 1-bit modulo-2 (MOD-2) counter. To count eight states, connect three flip-flops (23 = 8) as in Figure 3. Clock wiring decides synchronous or asynchronous operation and rising-edge or falling-edge triggering. Other connections give an up-counter, a down-counter, an up/down counter, a ring counter or a johnson counter.

application of flip flops

Event Detectors

An event detector changes state when a pulse arrives and holds that state until the event is cleared. A flip-flop does that because it keeps its output until its inputs change. A D flip-flop can, for example, remember that a light was switched on.
application of flip flops

Data Synchronizers

A data synchronizer makes combinational outputs change together. Gate delays otherwise make those outputs switch at different times and can produce a wrong code. Clocked D flip-flops hold the bits and release them on the same clock edge.
application of flip flops
The flip-flops keep the old bits until the rising clock edge. All outputs then update together.

Frequency Divider

Figure 6 is a rising-edge JK flip-flop with J and K tied high. It toggles on each rising clock edge (red lines). If the clock period is Tin, the output period Tout is 2 Tin, so fout = fin/2. One toggle stage halves the frequency. n stages in series divide by 2n, so fout = fin/2n.
application of flip flops
Two more common uses:

  1. D flip-flop can be used to create delay-lines which are used in digital signal processing systems. This application arises readily due to the fact that the output at the synchronous D flip-flop is nothing but the input delayed by one-clock cycle. Thus by cascading n such flip-flops, output can be delayed by n clock cycles which in turn produces the required amount of delay.
  2. Generally the mechanical switches used to enter the values into the digital system are prone to bouncing problem where the switch-contacts vibrate while closing/opening the switch. This leads to the variation in the output voltage causing the logical inputs to alternate between 0 and 1. This results in unexpected system behavior which can be avoided by connecting a RS flip-flop between the switch and the digital circuit to act as a switch debouncer.
Want To Learn Faster? 🎓
Get electrical articles delivered to your inbox every week.
No credit card required—it’s 100% free.

About Electrical4U

Electrical4U is dedicated to the teaching and sharing of all things related to electrical and electronics engineering.

Leave a Comment