IntermediateTopic 43 of 104Electronics & Embedded

Flip-flops

SR, D, JK and T devices store one bit and change on clock edges.

In depth

SR latch, D flip-flop (captures D at the clock edge), JK (toggles when J=K=1), T (toggle). Edge-triggered flip-flops avoid race conditions. Characteristic equations and excitation tables support design. Asynchronous set/reset override the clock.

Key points

  • Master-slave
  • Metastability when timing violated
  • D flip-flop most common
Example

Dividing a clock by 2 uses a T flip-flop.

Why it matters

Flip-flops store a bit of state and change only on clock edges, which makes them the heart of registers, counters and state machines.

Where this is used

  • Holding a button state in a register until the software reads it.
  • Building a counter that increments on each clock pulse.
  • Synchronising an asynchronous input to a clock domain.

Frequently asked questions

What is Flip-flops?

SR, D, JK and T devices store one bit and change on clock edges.

Why is it important to understand flip-flops?

Flip-flops store a bit of state and change only on clock edges, which makes them the heart of registers, counters and state machines.

What is the difference between a latch and a flip-flop?

A latch is level sensitive and transparent while enabled. A flip-flop changes only on a clock edge, which makes it more predictable in synchronous designs.

Why use a D flip-flop most often?

It captures its input on the clock edge and holds it, which is simple, reliable and the basis of most register designs.

How is Flip-flops used in practice?

Typical applications include holding a button state in a register until the software reads it, building a counter that increments on each clock pulse and synchronising an asynchronous input to a clock domain.

What should I learn before Flip-flops?

Study "Multiplexers and decoders" first (topic 42 of 104 in Electronics & Embedded). It covers the groundwork this topic builds on.

What are the key points of Flip-flops?

Master-slave. Metastability when timing violated. D flip-flop most common.

Can you give an example of Flip-flops?

Dividing a clock by 2 uses a T flip-flop.

What comes after Flip-flops?

The next topic is "Registers and counters", which builds directly on this one.

How difficult is Flip-flops?

It is classed as Intermediate in Electronics & Embedded (topic 43 of 104). It is an intermediate topic. Work through the beginner topics in Electronics & Embedded first.

Learning path

Want to practise? Open the interactive course for quick checks, quizzes, simulations and progress tracking.

Related topics