Analog Signal Strength Memory Array

An analog signal strength memory array stores a sequence of redstone signal strengths (1 to 15) in a First-In, First-Out (FIFO) queue. By stacking comparator memory cells vertically, values entered at the top automatically cascade down to the lowest empty slot and can be popped out from the bottom one by one. This circuit is ideal for combination locks, programmable music players, mini-games, and redstone computers.

Memory CircuitsAdvancedJava Edition
Analog Signal Strength Memory Array video tutorial

Video: Signal Strength Memory Arrays in Minecraft by Michael2_3B

How to build it

  1. Build a Base Comparator Memory Cell

    Create a standard comparator loop where two comparators face opposite directions in a 2x2 loop with redstone dust or blocks at the ends so a signal strength feeds back into itself indefinitely. Set one of the comparators to subtraction mode so that sending a signal of 15 into its side clears the stored value to zero.

  2. Set Up the Lectern Input Gate

    Place a lectern at the top of your array holding a 15-page written book. Run a comparator in subtraction mode out of the lectern, and lock its side input with a repeater powered at strength 15. Wire a button and pulse limiter so pressing the button briefly turns off the side repeater for 1 tick, letting the lectern's current page signal enter the array.

  3. Stack the Memory Cells Vertically

    Build identical comparator memory cells directly beneath the first one. Wire the output of each upper memory cell into the input comparator of the cell directly below it so data can cascade downward through the stack.

  4. Wire the Cell Lock Feedback

    From each memory cell's active loop, run a feedback line back to a repeater pointing into the side of the subtract-mode comparator that feeds into that cell. When a cell holds any value (1–15), this feedback powers the side input at strength 15, blocking any new values from entering or overwriting that cell.

  5. Add Observers to Clear Previous Cells

    Place an observer watching the state of each memory cell and run its output into a repeater set to 2 ticks pointing into the clear (side) input of the cell directly above it. Once a lower cell receives data, the observer fires a 2-tick pulse to erase the upper cell so the queue can shift down.

  6. Add the Pop Output Trigger at the Bottom

    At the lowest memory cell in the vertical stack, place a note block observed by an observer (or a button) wired into that bottom cell's clear repeater. Hitting the note block clears the bottom cell, unlocking its input and causing every stored value above it to drop down one level.

  7. Wire the Master Clear and Memory Full Indicator

    Run a vertical master reset line connected to the clear inputs of every cell in the stack so a single button wipes the entire array. Finally, connect the very top memory cell to a redstone lamp (temporarily disabled while the input button is pressed) to light up when the top cell stays occupied, indicating the array is full.

How it works

The circuit operates as a vertical First-In, First-Out (FIFO) shift register for analog signal strengths:

  • Comparator Loop Storage: Each layer is a comparator memory loop. Because comparators maintain the exact signal strength fed into them without decay when looped properly, a cell holds a value from 1 to 15 indefinitely.
  • Subtraction Clearing & Locking: Putting a comparator in subtraction mode (front torch lit) and feeding signal strength 15 into its side outputs Input - 15 = 0. This mechanic is used both to wipe a cell clean and to lock an input gate so subsequent values cannot overwrite an occupied cell.
  • Cascading Propagation: When you press the input button at the lectern, the signal enters the top cell. If the cell below it is empty, its input gate is unlocked, so the signal immediately flows into the lower cell.
  • Observer Cleanup: As soon as the lower cell becomes powered, an observer detects the change and sends a pulse through a 2-tick repeater into the upper cell's subtract input. A 1-tick observer pulse is too short to fully break a 2-comparator loop, so the 2-tick repeater ensures the upper cell clears completely.
  • Popping Data: Hitting the bottom note block clears the lowest cell. That removes its feedback lock, allowing the cell above it to drop its value down, which in turn triggers its observer to clear the cell above that, shifting the whole queue down by one slot.

Tips & variations

  • 2-Tick Clear Repeaters: Make sure the repeaters fed by the clearing observers are set to at least 2 ticks (second setting). A raw 1-tick pulse from an observer will not completely drain a comparator loop.
  • Non-Destructive Reading (Dual Array): If you want to read/pop the sequence without losing your saved data, build a second vertical array right next to the first. Gate the connections between each layer with a subtract comparator locked by a control line; briefly unpowering that line copies all layers into the secondary working array at once.
  • Storing Zero as Data: In a single analog array, signal strength 0 means "empty". To store 0 as a valid number in a sequence, run a parallel array alongside your data array. Every time you push a value (even 0), push a constant non-zero bit into the parallel array, and use the parallel array to control the cell locks and shifting logic.
  • Removing Middle Values: You can delete a specific item from the middle of the queue by manually pulsing the clear input of that specific layer; all values above it will automatically shift down to fill the gap.

Frequently asked questions

Why won't my comparator memory cell clear when the observer fires?
A standard comparator memory loop takes 2 redstone ticks to circulate. An observer outputs a 1-tick pulse, which only clears half the loop. Place a repeater set to 2 ticks after the observer to wipe the cell completely.
How do I input a specific signal strength from 1 to 15?
Use a lectern holding a Book and Quill with text on 15 pages. Turning the book to page 1 through 15 makes a comparator reading the lectern output that exact signal strength.
Can this array store a signal strength of 0?
Not in a single stack, because 0 represents an empty cell. To store 0 as actual data, you must build a second parallel array that tracks which slots are occupied and locks the corresponding slots in the data array.

Components used

More register / shift register