LogisimRevisited

Components / Memory

T Flip-Flop (Toggle Flip-Flop) in Logisim

T Flip-Flop in Logisim: characteristic truth table (T=0 hold, T=1 toggle on rising CLK edge), pinout (CLK, T, RST, Q, ~Q), and frequency divider / ripple counter design.

T-FFCLKTRSTQ~Q
Default settings, facing east. Pins are the dots.
LibraryMemory
Type nameT Flip-Flop
Pins and defaultsclk CLK (-40, 0), d T (-40, 20), rst RST (-20, 30), q Q (0, 0), qn ~Q (0, 20)

Try it in the app

How the T Flip-Flop Works in Logisim

The T Flip-Flop (Toggle Flip-Flop) is a 1-bit edge-triggered sequential memory component whose state flips (0 → 1 or 1 → 0) on the rising edge (0 → 1 transition) of the Clock (CLK) whenever its Toggle input (T) is High (1). When T is Low (0), the flip-flop holds its current state Q unchanged across clock edges.

Its characteristic equation is Q(next) = T ⊕ Q = (~T · Q) + (T · ~Q). In Logisim Revisited, if the T pin is left unconnected (floating Z), it defaults to 1 (toggle enabled), so a freshly placed T Flip-Flop toggles on every rising clock pulse automatically.

Pin layout in Logisim: On the left edge, the top input with the triangle marker is CLK (at offset -40, 0) and the lower input is T (at offset -40, 20). On the bottom edge is the active-high asynchronous Reset pin RST (at offset -20, 30), which immediately clears Q = 0 and ~Q = 1 whenever RST = 1. On the right edge are the state output Q (top, offset 0, 0) and its complement ~Q (bottom, offset 0, 20).

Divide-by-2 frequency divider & ripple counters: Tying T = 1 turns a T Flip-Flop into a divide-by-2 frequency divider—its output Q changes state once per rising clock edge, so Q completes one full 0-1-0 period for every two clock periods. Cascading multiple T Flip-Flops in series (or feeding each stage’s T input with the AND of all lower-order Q outputs) is the standard way to build a binary ripple or synchronous up-counter.

Tip: To build a divide-by-2 frequency divider or binary counter stage in Logisim, tie the T input to a Constant 1 (or Power) and feed your clock pulse into CLK.

T Flip-Flop Pins & Pinout

PinDirectionWidthLocation & Role
clk (CLK)Input (Upper-left, triangle)1 bitOffset (-40, 0). Rising-edge (0 → 1) clock input.
d (T)Input (Lower-left)1 bitOffset (-40, 20). Toggle enable input: T=0 holds Q; T=1 (or unconnected Z) toggles Q on rising CLK edge.
rst (RST)Input (Bottom edge)1 bitOffset (-20, 30). Asynchronous active-high reset: immediately forces Q = 0 and ~Q = 1 when RST = 1.
q (Q)Output (Upper-right)1 bitOffset (0, 0). Current stored 1-bit state Q.
qn (~Q)Output (Lower-right)1 bitOffset (0, 20). Complement of stored state (~Q).

T Flip-Flop Truth Table & Behavior

T Flip-Flop characteristic truth table (Q(next) = T ⊕ Q)
RSTCLKTQ(next)~Q(next)Effect
1XX01Asynchronous Reset (Q cleared to 0 immediately)
0↑ (0 → 1)0Q~QHold state (no change)
0↑ (0 → 1)1 (or Z)~QQToggle state (0 → 1, 1 → 0)
00, 1, or ↓XQ~QHold state (between rising clock edges)

Related Circuits & Components