Compact D Flip-Flop

A D flip-flop is a fundamental redstone memory circuit that records and holds the state of a data input only when triggered by a clock or write pulse. Because this vertical design is very compact and stackable, it is ideal for building multi-bit RAM modules, combination locks, or data registers in technical redstone projects.

Memory CircuitsIntermediateJava Edition
Compact D Flip-Flop video tutorial

Video: Minecraft Logic Gates 11 - Compact D-Flip-Flop [Tutorial] by Sw1Ftx16

How to build it

  1. Place the Base Torches and Frame

    Start by placing two redstone torches on the ground. Build a vertical T-shaped frame of solid blocks above and alongside them, adding one extra block extending off the end of the T.

  2. Add the Final Structural Block

    Place one more solid block adjacent to your main frame to complete the support structure for the vertical latch and input lines.

  3. Attach the Latch Torches

    Mount two redstone torches onto the front side of the block frame. Walk around to the back side and place another redstone torch, which will serve as your circuit's main output.

  4. Install the Control Torch and Wiring

    Place one final redstone torch on the remaining side block. Along the top of the frame, lay down three pieces of redstone dust with a redstone repeater positioned in the middle, plus one more dust on the lower step.

  5. Add the Data and Clock Inputs

    Attach a lever to the data input block and a button to the clock/write input block. Flipping the lever sets your data bit, and pressing the button writes that state to the output torch.

How it works

This circuit combines an input gating mechanism with a vertical RS NOR latch to store a single bit of data:

  • Data Input (Lever): Toggling the lever prepares the input line as either ON (1) or OFF (0), but the signal is held back from reaching the memory latch while the clock line is idle.
  • Clock/Write Input (Button): Pressing the button sends a pulse that temporarily unlocks the gating torches. This allows the current state of the lever to pass through the top repeater line and either set or reset the vertical RS NOR latch.
  • Memory Latch & Output: Once the button turns back off, the vertical RS NOR latch remains locked in its new state, keeping the rear output torch stable regardless of how many times you flip the lever afterward.

Tips & variations

  • Stacking for RAM: This design is easily stackable side-by-side (with a small gap or isolated lines so dust does not cross-connect). You can link all the button inputs to a single shared write line to store 4 bits (half a byte) or more simultaneously.
  • Torch Burnout: Since this circuit relies on basic redstone torch inversions and a standard repeater rather than zero-tick pulses, it works reliably across both Java and Bedrock editions.
  • Silent Operation: Because it uses only torches, dust, and a repeater without any pistons or droppers, this memory cell is completely silent.

Frequently asked questions

What is the difference between a D flip-flop and a T flip-flop?
A T flip-flop simply toggles its output every time it receives a pulse, whereas a D flip-flop saves the exact ON or OFF state of a separate data input whenever the write button is pressed.
Why doesn't the output change when I flip the lever?
In a D flip-flop, the lever only selects the next state. The output will only update after you press the button (the clock input) to write the data into the vertical RS NOR latch.
Can I connect multiple D flip-flops together?
Yes, you can line several of these circuits up in a row and connect all of their write inputs to a single button or clock line to create multi-bit redstone RAM.

Components used

More d flip-flop