Piston Tape Data Loop

A Redstone Data Loop is an advanced computational memory circuit that lets you input multi-digit decimal numbers one digit at a time and converts them into a 10-bit binary output. By combining compact Data Flip-Flops (DFF) with bit-shifting multiplication wires and an instant carry adder, the machine multiplies your stored total by 10 and adds the newest digit every time you clock it. This setup is essential for building calculators, keypads, and computers in Minecraft.

Piston ContraptionsExpertJava Edition
Piston Tape Data Loop video tutorial

Video: Build a Data Loop in Minecraft (Ft. WildEngineering) by IGN

How to build it

  1. Build the First Data Flip-Flop (DFF) Level

    Place a barrel containing one non-stackable item (like a Totem of Undying). Run a comparator out of the barrel set to subtract mode, and point it into the side of a repeater to lock it.

  2. Stack the Second DFF Level

    Sneak and place a second repeater directly on top of the first barrel. Next to it, place another comparator in subtract mode reading from a second barrel with a non-stackable item, then place a third barrel with a non-stackable item on top of the very first repeater to keep the array tileable.

  3. Tile the Memory to 10 Bits

    Add input and output repeaters to both levels of your 2-bit DFF module. Duplicate or stack this 2-bit slice four more times side-by-side so you have a 10-bit memory bank.

  4. Wire the Write-Control Bridge

    Add one extra barrel with a non-stackable item at the end of the array and build a block bridge across the side inputs of all the subtract comparators. Run redstone dust along the top of this bridge so a single signal can unlock every DFF simultaneously.

  5. Add a 2-Tick Clock Pulse Limiter

    At the middle of your control bridge, build a pulse limiter using a button running into a repeater set to 3 ticks (pushed back twice) with redstone torches above and below it. Pressing the button will now send a crisp 2-tick pulse to unlock and relock the memory cells.

  6. Connect the DFF Array to a 10-Bit Adder

    Position your 10-bit DFF memory bank behind the inputs of a 10-bit instant carry adder. Extend and align the input and output lines so they match the spacing of the adder channels.

  7. Wire the x10 Bit-Shift Multiplier

    To multiply the stored number by 10 (which equals 8A + 2A), split each bit's wire coming into the adder so it shifts both 1 position to the left (x2) and 3 positions to the left (x8). Build staircase block bridges over neighboring lanes and run redstone dust across them; the final two bits on the end do not need upper shifts since they exceed the 10-bit limit.

  8. Loop the Adder Outputs Back to the Memory

    From the bottom output of each bit on the instant carry adder, step a redstone line downwards using repeaters and zigzag block patterns. Alternate the vertical heights of adjacent lanes and block off intersecting corners so the 10 feedback wires never cross-connect.

  9. Connect the Feedback Loop to the DFF Inputs

    Route the 10 underground feedback lines back up to the front of the DFF memory bank. Place repeaters along the lines to refresh the signal strength so every bit cleanly reaches its corresponding DFF input.

  10. Install the Sticky Piston Clear Line

    Go four blocks above the feedback wires and place a row of 10 sticky pistons facing down with solid blocks on their faces. Wire them together to a single control lever; activating the pistons pushes the blocks down to cut all 10 feedback signals when you want to reset the memory to zero.

How it works

This machine relies on three digital logic concepts working together inside a closed loop:

  • Data Flip-Flops (Memory): Each bit is stored using repeater locking. A barrel holding a non-stackable item outputs a full comparator signal into the side of a repeater, keeping it locked indefinitely. When you press the clock button, the 2-tick pulse feeds into the side of the subtract-mode comparator, canceling its output for 2 ticks. This briefly unlocks the repeater so it takes in the new state from the adder, then locks it again to hold that value.
  • Constant Multiplication by 10: In binary, shifting a number left by one bit doubles it. Because 10 = 8 + 2 (or 2^3 + 2^1), any binary number A multiplied by 10 can be written as (A << 3) + (A << 1). By physically wiring each looped output bit into the adder 1 lane over and 3 lanes over, the hardware automatically computes 10 times the stored value with zero extra clock cycles.
  • Accumulation & Reset: When you enter a new single-digit decimal value (0–9) on the manual input levers and press the clock button, the adder sums the shifted loop value (previous_total * 10) with your new digit and latches the result into the DFF bank. Activating the sticky piston line cuts the feedback loop so clocking the circuit with empty inputs writes all zeroes.

Tips & variations

  • Use WorldEdit in Creative: Because a 10-bit bus uses identical lanes, build one or two slices of the DFF, bit-shifter, feedback wire, and piston cut-off, then use //stack 9 -a (including the -a flag so air blocks don't overwrite your adder's carry logic).
  • Any Non-Stackable Item Works: The video places Totems of Undying inside the barrels, but in survival you can use wooden shovels, stone swords, or leather armor to produce the same signal strength.
  • Prevent Wire Crosstalk: When building the zigzag feedback buses underneath the adder, always place solid blocks above diagonal drops to cut adjacent dust lines from connecting.
  • Clearing the Machine Properly: To reset the data loop, first turn off your manual input levers, engage the sticky piston clear line to cut the loop, press the clock button once to latch zeroes into the DFFs, and then retract the pistons.

Frequently asked questions

What is a Data Flip-Flop (DFF) in Minecraft redstone?
A Data Flip-Flop is a 1-bit memory cell that only updates its stored value when it receives a clock pulse. In this build, it uses a locked repeater controlled by a comparator in subtract mode.
How does the circuit multiply by 10 without a full multiplier?
It splits each binary bit into two wires: one shifted left by 1 bit (multiplying by 2) and one shifted left by 3 bits (multiplying by 8). The binary adder then adds 8x + 2x together to get 10x.
Do I need an Instant Carry Adder before building this?
Yes. The Data Loop is designed to sit behind and loop around a 10-bit binary adder, which sums the shifted feedback wires and your new decimal digit input.

Components used

More block feeder