Order-Sensitive Memory Array

Standard Minecraft RAM stores which inputs were activated, but it cannot naturally remember the sequence in which they were pressed. By combining vertical D flip-flops into parallel shift registers, you can build an order-sensitive memory array that records exact input sequences. This circuit is ideal for typing characters onto a scrolling marquee or creating reprogrammable combination door locks.

Memory CircuitsAdvancedJava Edition
Order-Sensitive Memory Array video tutorial

Video: Minecraft - Order-sensitive Memory tutorial (RDF) by davisd0909

How to build it

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

Frequently asked questions

Why does the clock line have to travel backward from the last latch to the first?
If the first latch updated first, its new output would immediately overwrite the input of the second latch before the second latch could pass its old data forward. Clocking from back to front with a 1-tick delay ensures each cell passes its data along before receiving new data.
How is this different from normal Minecraft RAM?
Standard RAM writes data to fixed address slots, meaning it remembers which inputs were toggled on, but not the sequence of button presses. Parallel shift registers advance all slots on every press, preserving the exact chronological order.
What can I use order-sensitive memory for?
It is commonly used for keyboards and scrolling marquee displays where letter order matters, as well as reprogrammable combination locks where buttons can be repeated in a specific sequence.

Components used

More register / shift register