User:Munin295/Memory circuit

A memory circuit is a redstone circuit which "remembers" its output state until told to change it.


 * T Flip-Flop
 * One input: toggle output state between off and on.
 * A t flip-flop answers the question: "How do I turn a button into a lever?"


 * SR Latch
 * Two inputs: set output on, reset output back off.


 * SRT Latch
 * Three inputs: set output on, reset output back off, and toggle output between off and on.


 * D Flip-Flop
 * Two inputs, a data input and a clock input, and only changes its output to match its data input when the clock input triggers it.


 * JK Latch
 * Two inputs: set output on, and reset output off, but toggle output if both inputs turn on simultaneously.

T Flip-Flop
A T Flip-Flop (short for "toggle flip-flop") has one input and one output, and toggles its output between off and on when triggered by its input.

This section includes T flip-flops that are triggered on either the input's rising edge or falling edge. A dual-edge-triggered T flip-flop would usually be pointless, acting as only a repeater or inverter.

Rising-Edge T Flip-Flop

 * Lever T Flip-Flop


 * 1×2×1 (2 block volume)
 * 1-high, 1-wide, silent


 * A lever can act as a simple T Flip-Flop. Its input is player activation, and it remembers its output state until re-activated.


 * Dropper-Loop T Flip-Flop


 * 1×2×2 (4 block volume)
 * 1-wide
 * circuit delay: 3 ticks


 * When the item is in the bottom dropper, turning on the input pushes the item into the top dropper, turning the output comparator on. When the item is in the top dropper, turning on the input causes the top dropper to eject the item, but the hopper immediately sucks it in and returns it to the bottom dropper, turning the output comparator off.


 * Even though the item is being ejected, it is not possible to (accidentally or purposefully) pick it up before the hopper sucks it in. When an item is ejected into the Minecraft world as an entity (either by the player, mob death, a dropper, etc.), there is a short period of time in which it cannot be picked up, and hoppers suck items in before this period ends. So it is safe to stand around or on the circuit without interfering with it.


 * Because the output comes from a comparator used as an inventory counter, the output power level will only be 1 (with a stackable item) or 3 (with a non-stackable item).


 * Variations: The comparator can be moved to another side of the droppers. This can allow you to place a repeater on the hopper facing the dropper to activate it. Combined with the original version, this makes the circuit 1-wide alternating tileable.


 * Dropped-Block T Flip-Flop


 * 1×6×3 (18 block volume)
 * 1-wide


 * A dropped-block T flip-flop uses a 1-tick pulse to cause a sticky piston to push a block and not pull it back (called "dropping the block"), or retract a dropped block.


 * Variations: Other pulse limiters can be used to deliver the 1-tick pulse to the piston.


 * Locked-Hopper T Flip-Flop


 * 1×5×4 (20 bock volume)
 * 1-wide, silent
 * circuit delay: 2 ticks


 * A locked hopper TFF consists of an inverted rising edge detector keeping two hoppers deactivated until the input's rising edge. When the input turns on, the hoppers are activated just long enough for the item inside to move once, toggling the output.


 * Locked-Repeater T Flip-Flop


 * 2×5×2 (20 block volume)
 * flat, silent
 * circuit delay: 3 ticks


 * Locked-Clock T Flip-Flop


 * 3×5×2 (30 block volume)
 * flat, silent
 * circuit delay: 4 ticks



Falling-Edge T Flip-Flop

 * Opposed-Piston T Flip-Flop


 * 1×4×3 (12 block volume)
 * 1-wide
 * circuit delay: 2.5 ticks (rising output) or 1 tick (falling output)


 * When the input turns off, the extended piston begins to retract. One tick later, the torches turn on. The retracting piston instantly aborts by finishing its retraction and attempting to extend again, but the non-moving piston has already started pushing the block of redstone and gets priority, causing the block of redstone to switch position.


 * Locked-Hopper Falling-Edge T Flip-Flop


 * 1×5×4 (20 block volume)
 * 1-wide, silent
 * circuit delay: 1 tick


 * … When the input turns off, the hoppers are activated just long enough for the item inside to move once, toggling the output.


 * TFF


 * 1×3×3 (9 block volume)
 * 1-wide
 * circuit delay: 2.5 ticks (rising output) and 1 tick (falling output)



Counter
A counter is a circuit which stores a number.


 * A synch counter updates all of its outputs at the same time.
 * A ripple counter uses the previous output to update the next output.
 * An up/down counter can increment its output in both the positive and negative directions.

Binary counter
A binary counter is a counter whose output is encoded as a binary number.


 * Locked-Repeater Binary Synch Counter


 * 3x3x3 (27 block volume) per bit
 * circuit delay: 2 ticks


 * The input must be kept powered, except for a 2-tick off-pulse to increment the counter, so usually should be preceded with an inverted rising edge detector. Despite the redstone torches, this build can be clocked at up to 2.5 Hz (2 ticks on, 2 ticks off).


 * Based on a [//www.reddit.com/r/redstone/comments/1xgtlb/stupidly_compact_binary_counter_yeah/ design (09 February 2014)] by "IceAndMc".


 * Locked-Repeater Binary Ripple Counter


 * 2x4x2 (16 block volume) per bit
 * flat
 * circuit delay: 1 tick per bit


 * The input must be kept powered, except for a 2-tick off-pulse to increment the counter, so usually should be preceded with an inverted rising edge detector. Despite the redstone torches, this build can be clocked at up to 2.5 Hz (2 ticks on, 2 ticks off).


 * Variations: The torches can be moved to the tops of the blocks, compacting the width of the circuit at the expense of its height:


 * Earliest Known Publication: 11 October 2013