Flip-Flop Calculator

Calculate next state for SR, JK, D, and T flip-flops with interactive truth tables. Essential for sequential circuit design and state machine analysis.

✓ SR, JK, D, T flip-flops ✓ Next state calculation ✓ Truth tables & expressions

Flip-Flop Type

Inputs

What are Flip-Flops?

Flip-flops are fundamental sequential logic circuits that can store one bit of information. They form the building blocks of memory elements, registers, and counters in digital systems.

Types of Flip-Flops

SR Flip-Flop (Set-Reset)

Has Set (S) and Reset (R) inputs. When S=1, output becomes 1. When R=1, output becomes 0.

  • S=0, R=0: Hold current state
  • S=0, R=1: Reset (Q=0)
  • S=1, R=0: Set (Q=1)
  • S=1, R=1: Invalid/forbidden state

JK Flip-Flop

Improved version of SR flip-flop that eliminates the forbidden state by toggling when both inputs are high.

  • J=0, K=0: Hold current state
  • J=0, K=1: Reset (Q=0)
  • J=1, K=0: Set (Q=1)
  • J=1, K=1: Toggle state

D Flip-Flop (Data/Delay)

Simplest flip-flop where the next state equals the D input. Used for data storage and synchronization.

  • D=0: Next state = 0
  • D=1: Next state = 1

T Flip-Flop (Toggle)

Toggles output when T=1, holds state when T=0. Commonly used in counters and frequency dividers.

  • T=0: Hold current state
  • T=1: Toggle state

Applications

Memory and Storage

  • Register design
  • Memory cells
  • Data latches
  • Buffer circuits

Sequential Circuits

  • Counters and timers
  • State machines
  • Frequency dividers
  • Shift registers

Examples & Worked Problems

Example 1: JK Flip-Flop

Problem: Current state Q=0, inputs J=1, K=0. Find next state.

Solution:

  • J=1, K=0 means SET operation
  • Next state Q+ = 1

Example 2: T Flip-Flop Counter

Problem: Design a 2-bit counter using T flip-flops.

Solution:

  • T0 = 1 (always toggle)
  • T1 = Q0 (toggle when Q0=1)
  • Sequence: 00 → 01 → 10 → 11 → 00...

Related Tools