Skip to content
BetterDL

T flip-flop

Also called: toggle flip-flop, T flip flop, T-type flip-flop, TFF, T-FF

An edge-triggered flip-flop with one input T: at each active clock edge it toggles Q if T = 1 and holds Q if T = 0. Q⁺ = T ⊕ Q.

A T flip-flop has a single input, T, which answers one question at each rising clock edge: should Q change?

  • T = 0: hold. Q keeps its value.
  • T = 1: toggle. Q flips to its opposite.

T never says what Q should become, only whether it flips. Its characteristic equation is Q⁺ = : XOR with 1 inverts, XOR with 0 passes through.

Why it matters:

  • With T held at 1, Q flips every edge, so it runs at half the clock frequency. That is a frequency divider.
  • In a binary counter, each bit flips exactly when all lower bits are 1. T flip-flops express that directly: Tᵢ is the AND of the lower bits. That is why counters are often designed with them.

You rarely buy a T flip-flop as a part. Instead you make one: tie J and K of a JK flip-flop together as T, or drive a D flip-flop with D = .

A quick shortcut: count the edges where T = 1. An even count leaves Q where it started; an odd count leaves it flipped.

CLKTQ

Worked examples

Example

Tracing the diagram above

Q starts at 0. Rising edges are in slots 2, 4, 6, 8 and 10.

  1. 1.

    Slot 2: T = 1, flip. Q: 0 → 1.

  2. 2.

    Slot 4: T = 1, flip. Q: 1 → 0. T staying at 1 does not keep Q at 1.

  3. 3.

    Slot 6: T = 0, hold. Q stays 0.

  4. 4.

    Slot 8: T = 1, flip. Q: 0 → 1.

  5. 5.

    Slot 10: T = 1, flip. Q: 1 → 0.

Example

Using the parity shortcut

A T flip-flop starts at Q = 0. T is held at 1 for 23 rising edges. What is Q afterwards?

  1. 1.

    Every edge flips Q, so there are 23 flips.

  2. 2.

    23 is odd, so Q ends flipped from its start.

  3. 3.

    Q = 1.

Common mistakes

  • Treating T like D. T = 1 means flip, not "load 1". From Q = 1, T = 1 gives 0.

  • Thinking T = 0 clears Q. It holds.

  • Toggling between edges. Like every flip-flop, it acts only at the active edge.

Practice T flip-flop

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

T flip-flop is taught in Latches and Flip-Flops and Counters.