1-Wide D Flip-Flop

A D flip-flop (data flip-flop) is an essential redstone memory circuit that stores a single bit of data and locks it in place using a clock or control input. It allows an output signal (Q) to match the data input (D) only when the control line (C) is unlocked. This 1-wide vertical design is ideal for building compact memory registers, combination locks, and redstone computers where multiple memory cells need to sit side by side.

Memory CircuitsIntermediateJava Edition
1-Wide D Flip-Flop video tutorial

Video: 1 Wide - D-Flipflop by James “jt” Tumber

How to build it

  1. Set Up the 1-Wide Frame

    Clear a 1-block-wide vertical strip for your circuit. If you plan to build a multi-bit memory bank, leave a 1-block air gap between each slice so adjacent redstone dust lines do not connect.

  2. Place the Data (D) and Control (C) Inputs

    Attach two levers on the front of the 1-wide frame at different heights. The upper lever acts as your Data (D) input, while the lower lever serves as your Control or Clock (C) lock.

  3. Wire the Gating and Latch Logic

    Following the classic 1-wide wiki layout, arrange your redstone torches, dust, and repeaters vertically between the two inputs so that the C input gates the D line and feeds into a self-holding latch at the back.

  4. Connect the Output Line (Q)

    Run your output redstone line (Q) from the final stage of the latch at the back of the slice. Place a redstone lamp, piston, or dust line at the output so you can easily read the stored state.

  5. Test Writing and Locking Data

    Toggle the C lever to the unlocked position and flip the D lever on and off to verify the output follows it. Then flip the C lever to the locked position and toggle D again to confirm the output stays frozen.

How it works

A D flip-flop operates using two inputs—D (Data) and C (Control/Clock)—and one output, Q:

  • Unlocked State (Write Mode): When the C input is toggled to the open state, the internal gating logic allows the signal from lever D to pass straight through to output Q. Flipping D on turns Q on; flipping D off turns Q off.
  • Locked State (Hold Mode): When you flip the C lever to the locked state, it blocks any changes from the D input and locks the internal memory latch. Even if you continuously toggle the D lever on and off, output Q remains stuck in whatever state (on or off) it held at the exact moment C was locked.

This makes it ideal for shared data buses: you can send a stream of signals into the D input of several flip-flops at once, and only the row with an unlocked C line will overwrite its stored value.

Tips & variations

  • Building Memory Arrays: Place multiple 1-wide D flip-flops side by side with a 1-block gap between each slice to prevent redstone dust crosstalk.
  • Shared Data Bus: You can run a single data line across all D inputs simultaneously and use repeaters on individual C lines to select which specific memory cell opens up to record the data.
  • Modern Alternative: In later versions of Minecraft, you can also create an ultra-compact D flip-flop simply by running one redstone repeater into the side of another repeater (repeater locking), where the back repeater is D and the side repeater is C.

Frequently asked questions

What is the difference between a T flip-flop and a D flip-flop?
A T flip-flop toggles its output every time it receives a pulse, acting like a button-to-lever converter. A D flip-flop copies the exact on/off state of a Data input and locks that state into memory whenever the Control line is closed.
Why doesn't my output change when I flip the D lever?
If flipping the D lever does nothing, your C (Control) lever is currently in the locked state. Flip the C lever first to unlock the latch, set your D value, and then flip C back to lock it.
Can I stack this 1-wide D flip-flop directly next to another one?
Because traditional torch-and-dust 1-wide designs use exposed redstone dust, you should leave a 1-block air gap between adjacent slices so the dust lines do not connect to neighboring slices.

Components used

More d flip-flop