
Video: Minecraft - Order-sensitive Memory tutorial (RDF) by davisd0909
How to build it
- Build a Vertical D Flip-Flop
Start by constructing a single vertical D latch (D flip-flop). Establish a data input (D) at the front, a saved state output torch at the back, and a clock input line underneath.
- Chain Latches into a Shift Register
Build several vertical D flip-flops in a straight line back-to-back (four is a good starting size for a 4-bit register). Wire them so the output of the first latch feeds directly into the data input of the next latch down the line.
- Add a Monostable Clock Circuit
Build a pulse limiter (monostable circuit or edge trigger) on your main clock input line. This shortens the clock signal into a brief pulse so stored data only shifts one position per press.
- Wire the Reverse Clock Line
Run the shortened clock signal from the very last D flip-flop in the chain back toward the first input latch. Place a 1-tick redstone repeater between each latch stage so the end of the register updates first.
- Build Parallel Shift Registers
Construct additional identical shift registers side by side, leaving enough space between rows so the redstone dust does not cross-connect. Each parallel row will represent a different button, number, or letter input.
- Synchronize the Clock Signals
Connect the clock lines of all parallel shift registers together across the bottom. When any input is entered and clocked, every parallel register must shift its stored bits forward at the exact same time.
- Attach Output AND Gates
To read or release the stored sequence in order (such as when pressing an Enter key), wire vertical AND gates to the outputs of every latch stage. Connect a sequential release line through another pulse limiter to trigger each column of AND gates in the order the buttons were originally pressed.
How it works
This circuit relies on chaining memory cells together and timing the clock pulse in reverse so data moves cleanly down the line without overwriting itself:
- The D Latch (D Flip-Flop): A single cell holds 1 bit of memory. Changing the data (D) lever does nothing to the output until the clock line pulses. When clocked, the output locks into whatever state the data input currently holds.
- The Shift Register: Because the output of Latch 1 is wired directly to the input of Latch 2 (and so on), pulsing the clock pushes every stored bit one slot forward.
- Reverse Clock Propagation: In Minecraft redstone, clocking all latches simultaneously causes data to race through multiple slots at once. Instead, the clock pulse enters at the far end (Latch 4) and travels backward toward Latch 1 with a 1-tick repeater delay between each stage. Latch 4 grabs Latch 3's data first, then 1 tick later Latch 3 grabs Latch 2's data, shifting the entire pattern cleanly by one step.
- Order-Sensitive Array: By placing multiple shift registers side by side and sharing a single master clock line, each clock pulse takes a snapshot of which row was active during that specific press. Looking across the columns from back to front reveals the exact chronological order of your inputs.
Tips & variations
- Keep the Clock Pulse Short: If your monostable circuit produces a pulse that is too long, a single button press may shift your data across two or more memory slots.
- Scalability: You can expand this array to any length or width. For example, 26 parallel registers that are each 15 bits long can store a 15-character message using the full English alphabet.
- Reprogrammable Locks: You can build a user-friendly combination lock by having an interior master keypad write a multi-digit sequence into the array, and comparing exterior keypad presses against the stored shift register outputs.





