Toggle gate minecraft

Toggle gate minecraft DEFAULT

This article is about a specific category of redstone circuits. For other circuits, see redstone circuit.

Note: This page uses many schematics, which are loaded individually for performance reasons. [Schematic Help] 

Latches and flip-flops are effectively 1-bit memory cells. They allow circuits to store data and deliver it at a later time, rather than acting only on the inputs at the time they are given. As a result of this, they can turn an impulse into a constant signal, "turning a button into a lever".

Devices using latches can be built to give different outputs each time a circuit is activated, even if the same inputs are used, and so circuits using them are referred to as "sequential logic". They allow for the design of counters, long-term clocks, and complex memory systems, which cannot be created with combinatorial logic gates alone. Latches are also used when a device needs to behave differently depending on previous inputs.

There are several basic categories of latches, distinguished by how they are controlled. For all types, the input lines are labeled according to their purpose (Set, Reset, Toggle, Data, Clock). There are also more arbitrary labels: The output is commonly labeled Q for historical reasons. Sometimes there is also an "inverse output" Q̅, which is always ON when Q is OFF and vice versa. If both Q and Q̅ are available, we say the circuit has "dual outputs". Most of the following types can be built as a "latch" that responds to the level of a signal, or as a "flip-flop" triggered by a change in the signal.

  • A RS latch has separate control lines to set (turn on) or reset (turn off) the latch. Many also have dual outputs. The oldest form of RS latch in Minecraft is the RS-NOR latch, which forms the heart of many other latch and flip-flop designs.
  • A T latch has only one input, the toggle. Whenever the toggle is triggered, the latch changes its state from OFF to ON or vice versa.
    • There are also SRT latches, combining the inputs and abilities of the RS and T latches.
  • A D latch has a data input and a clock input. When the clock is triggered, the data input is copied to the output, then held until the clock is triggered again.
  • A JK latch has three inputs: A clock input, and the jump and kill inputs. When the clock is triggered, the latch's output can be set, reset, toggled, or left as is, depending on the combination of J and K. While these are common in real-world electronics, in Minecraft they tend to be bulky and impractical — most players would use an SRT latch instead.

RS latches[]

An RS latch has 2 inputs, S and R. The output is conventionally labeled Q, and there is often an optional "inverse output" Q̅. (Having both Q and Q̅ is called "dual outputs"). When a signal comes into S, Q is set on and stays on until a similar signal comes into R, upon which Q is reset to "off". Q̅ indicates the opposite of Q — when Q is high, Q̅ is low, and vice versa. Where a Q̅ output is available, the player can often save a NOT gate by using it instead of Q.

Note that the proper name for this category of latch is "SR latch". However, in real-world electronics as in Minecraft, the classic implementation of such latches starts by inverting the inputs; such a latch is the proper "RS latch", but they're so common that the term is commonly used also for what "should" be called SR latches.

Typical uses include an alarm system in which a warning light stays on after a pressure plate is activated until a reset button is pushed, or a rail T-junction being set and reset by different detector rails. RS latches are common parts of other circuits, including other sorts of latches.

Setting both inputs high simultaneously is a "forbidden" condition, generally something to avoid. In the truth table, S=1, R=1 breaks the inverse relationship between Q and Q̅. If this happens, the player will get "undefined behavior" — various designs can do different things, and especially Q and Q̅ can be high or low at the same time. If the forbidden state is co-opted to toggle the output, the circuit becomes a JK latch, described in its own section. If there is instead a third input which toggles the output, the circuit becomes an "RST latch".

Any RS latch with dual outputs is functionally symmetrical: pulsing each input turns on "its" output, and turns off the other one. Thus R and S are interchangeable, if the outputs is swapped: Which input players pick as S chooses which of the outputs is Q, then the other input will be R and the other output will be Q̅. (If the original circuit only had a Q output, then swapping the inputs will turn it into Q̅.) In several designs (A, B, C, D, E, F, I) the functional symmetry is reflected by the circuit's physical symmetry, with each input energizing the torch it leads to, while turning off the other.

RS latches can be built in a number of ways:

  • Two NOR gates can be linked so that whichever is lit, the other will be off. The RS NOR latch is the "original" RS latch, and still among the smallest memory devices that can be made in vanilla Minecraft. While they can be built with just torches and redstone dust, repeaters can also be used. Many of these designs have "duplex I/O"—the same locations can be used to read or set the latch state.
  • It is also possible to construct an RS NAND latch, using NAND gates instead of NOR gates. These will be larger and more complex than an RS NOR latch, but may be useful for specialized purposes. Their inputs are inverted (see below for details).
  • Other RS latches can be created by fitting an "input sustaining circuit" with a reset switch, say by adding a pair of NOT gates or a piston, placed so as to interrupt the circuit when triggered. Such a construction can be nearly as compact as an RS NOR latch (and often with better I/O isolation and/or timing), but they will usually not have a natural Q̅ output.
  • Other devices can also be involved. Pistons can be used to physically toggle a block's location, while hoppers or droppers can pass around an item entity. These circuits can be very fast and small, with little redstone dust.
0011Keep stateKeep state

RS-NOR latches[]

Designs A and B are the most fundamental RS-NOR latches. In both cases, their inputs and outputs are "duplex"—the latch state can be read (Q) or set (S) on one side of the circuit, while on the other side, the latch can be reset (R), or the inverse output read (Q̅). If separate lines for input and output are needed, opposite ends of B can be used, or A can be elaborated into A' with separate locations for all four lines.

These can be modified to provide separate, even isolated, input and output. C and D use torches and repeaters respectively to isolate the outputs, though the inputs can still be read. E expands the circuit slightly to isolate all four I/O lines.

Design F provides a vertical (1-wide) option; again, the I/O is duplex, though isolated outputs can be taken at alternate locations.

Design G takes up more room than F, but may be preferable, as both the set and reset are on the same side. Also, be sure to compensate for the extra tick on (Q̅), caused by the last torch.

Design H is smaller than design F in term of height, input and output are on the same height, but it is longer and a bit slower due to the repeater.

Furthermore, it is easily stacked vertically and horizontally (with a shift of 2 blocks on the Y axis).

Design I is similar to design G as it has both set and reset on the same side,but takes up less space. The I/O is duplex, though isolated outputs can be taken at alternate locations.

Design J is similar to design G as it has both set and reset on the same side, but has no slowness due to not having any extra repeaters or torches. This may be more preferable to G, although the outputs (Q/Q̅) are not level with the inputs (R/S).

RS NAND latches[]

An RS latch can also be designed using NAND gates. In Minecraft, these are less efficient than the RS NOR latch, because a single Redstone torch acts as a NOR gate, whereas several torches are required to create a NAND gate. However, they can still be useful for specialized purposes.

Such an "RS NAND latch" is equivalent to an RS NOR, but with inverters applied to all the inputs and outputs. The RS NAND is logically equivalent to the RS NOR, as the same R and S inputs give the same Q output. However, these designs take inverse R and S (R̅, S̅) as inputs. When S̅ and R̅ are both off, Q and Q̅ are on. When S̅ is on, but R̅ is off, Q̅ will be on. When R̅ is on, but S̅ is off, Q will be on. When S̅ and R̅ are both on, it does not change Q and Q̅. They will be the same as they were before S̅ and R̅ were both turned on.

RS-Latch summary table 1[]

This table summarizes the resources and features of the RS latches which use only redstone dust, torches, and repeaters.

Redstone wire6410404368
Inputs isolated?DuplexDuplexDuplexDuplexYesYesDuplexYesYes
Outputs isolated?DuplexDuplexDuplexYesYesYesDuplex/YesNoYes
Input orientationoppositeadjacentoppositeoppositeoppositeoppositeoppositeperpendicularperpendicular

Analog RS latch[]

This latch will maintain the highest signal level that arrived from input S if R is off, and fade (reduce memorized signal strength) by strength of R every two redstone ticks. For maximum strength (15) signals it behaves like any other RS latch, but it can also memorize intermediate signal levels, and since 2-tick pulses on R will subtract their strength from its memorized state, it makes a nice element of counter or countdown circuits.

Input stabilization with reset[]

Input Stabilization Circuit

An "Input-Stabilizing Circuit" responds to an input pulse by turning its input on and leaving it on. This can be built up into an RS Latch by adding a means to turn it off. These circuits usually don't offer a "natural" Q̅ output. Design J adds a pair of NOT gates, with the reset going to the second torch. (The NOT gates can also be added to the upper redstone loop.) Design K uses its piston to block the circuit where it goes up onto the solid block. Design L shows the reverse approach, breaking the circuit by withdrawing a power-carrying block.

Pistons and other devices[]

A pair of non-sticky pistons can be used to physically push a block back and forth. This can make or break a circuit from a torch, producing an RS latch with no inverse output (M). If the block being pushed is a block of redstone, the circuit can be even smaller, with dual outputs (N). Both of these have isolated inputs and outputs. Putting two blocks between the pistons produces an SRT latch O, with an extra input to toggle the latch state. And droppers can also be pressed into service, as in design P: Small, tileable, but it does require a comparator.


  • Expand an RS latch easily into a monostable circuit, which automatically disables itself some time after activation. To do this, split the output redstone path into two parts. The new path should run through some repeaters, and in to the reset input. When players turn on the latch, redstone feeds a signal through the delay before turning off the latch. This works not only for Q and R, but for Q̅ and S as well. A more complex delay mechanism, such as a water clock, can replace the repeaters.
  • An "Enable/Disable RS latch" can be made by adding a pair of AND gates in front of the inputs, testing each of them against a third input, E. Now if E is true, the memory cell works as normal. If E is false, the memory cell will not change state. That is, E latches (or equivalently, clocks) the RS latch itself. Note that for design Q, the outputs are not isolated, and a signal to them can set the latch regardless of E. Alternatively, repeaters could be used to latch the inputs, but this costs more and saves no space.
  • As noted above, if it is possible to add a "toggle" input, the RS latch becomes an RST latch. If the "forbidden" state is used for the toggle, then it's a JK latch.

Dropper SR latch[]

Allows a lot of flexibility in geometry — the droppers can be read from 3 sides each and activated from 5 sides each; can be oriented vertically too and content can be read with comparators through solid blocks. However, always power it through an adjacent block; if players power the dropper directly, they will activate the other dropper too and the order is unpredictable. Activates on rising edge, meaning they can apply S even while R is still active or vice versa.

RS latch summary table 2[]

Other devices--1 sticky piston1 sticky piston2 normal pistons2 normal pistons2 normal pistons2 droppers, 2 comparatorsN/A
Inputs isolated?Yes,NoNoYesYesNoYesYes
Outputs isolated?YesNoNoYesYesYesYesNo
Q̅ available?NoNoNoNoYesNoYesYes
Input orientationPerpendicularPerpendicularAdjacentOppositeOppositeOppositeAdjacentAdjacent

D latches and flip-flops[]

A D ("data") flip-flop or latch has two inputs: The data line D, and the "clock" input C. When triggered by C, the circuits set their output (Q) to D, then hold that output state between triggers. The latch form, a "gated D latch", is level triggered. It can be high- or low-triggered; either way, while the clock is in the trigger state, the output will change to match D. When the clock is in the other state, the latch will hold its current state until triggered again. A D flip-flop is edge triggered; it sets the output to D only when its clock input changes from "off" to "on" (rising edge) or vice versa (falling edge), according to the circuit. An edge trigger can turn a gated D latch into a D flip-flop.

Building these devices with torches is fairly unwieldy, though some older designs are given below. Repeaters have a special latching ability, which drastically simplifies the problem. Now a gated D latch can be made with two repeaters, and a D flip-flop with four repeaters and a torch:

Design G uses the repeater's latching feature, which is added to the game in Java Edition 1.4.2. It holds its state while the clock is high, and is by far the most compact of the D latch designs. Design H combines two such latches, one high and one low triggered, to create a rising edge-triggered D flip-flop. The block and redstone torch can be reversed for a falling edge-triggered design. The design is based on a real life implementation of an edge-triggered D flip-flop called a "Master-Slave" configuration.

Modern Gated D Latch (G)
(High level)

Modern D Flip-flop (H)
(rising edge)

Analog D latch[]

Analog D latch (J) (Low level)

6×4×2 (48 block volume)
flat, silent
circuit delay: 3 ticks
Earliest Known Publication: May 26, 2018[1]

Design J is an analog version of a low-triggered D latch. The signal strength of the output Q is the same as input D when the latch is triggered.

For maximum strength (15) signals for D, this latch behaves like a normal (digital) low-triggered D latch.

Torch-based designs[]

For historical interest, here are several older designs, not dependent on latched repeaters, along with a table of their resource needs and other characteristics. A few of these designs also have the additional inputs and inverse output of an RS latch.

This basic level-triggered gated D latch (design A) sets the output to D as long as the clock is set to OFF, and ignores changes in D as long as the clock is ON. However, on a rising clock edge, if D is low, the output will pulse high for 1 tick, before latching low.

Design B includes a rising-edge trigger and it will set the output to D only when the clock goes from OFF to ON. The torch-based edge trigger could also be replaced with one of the designs from the Pulse circuit page.

These are RS latch-based circuits with appropriately set front-ends. Directly trigger the RS latch using the R and S inputs to override the clock, forcing a certain output state. Sending signals into the Q and Q̅ lines works similarly, because the output is not isolated. To isolate the outputs, add inverters and swap the labels.

Design C is a one block wide vertical version of A, except for using a non-inverted clock. It sets the output to D while the clock is ON (turning the torch off). This design can be repeated in parallel every other block, giving it a much smaller footprint, equal to the minimum spacing of parallel data lines. A clock signal can be distributed to all of them with a wire running perpendicularly under the data lines, allowing multiple flip-flops to share a single edge-trigger if desired. The output Q̅ is most easily accessed in the reverse direction, toward the source of input. As in design A, the un-isolated Q and Q̅ wires can do double duty as R and S inputs. Q can be inverted or repeated to isolate the latch's Set line.

Design E provides a more compact (but more complex) version of A, while still affording the same ceiling requirement. E' allows the latch to act on a high input.

Design F holds its state while the clock is high, and switches to D when the clock falls low. The repeater serves to synchronize the signals that switch out the loop and switch in D. It must be set to 1 to match the effect of the torch.

Redstone wire111856109700
TriggerLow LevelRising EdgeHigh LevelHigh LevelLow LevelHigh LevelLow LevelHigh LevelRising Edge
Output isolated?NoNoNoNoNoNoYesYesYes
Input isolated?YesYesC OnlyC OnlyYesYesNoYesYes

BUD-based D flip-flop[]

BUD-based D Flip-flop (I) (low level)

Note: This design seems to be broken as of Java Edition 1.5.1 — the piston is powered by the torch through the block it pushed. However, it might be fixable.

Design I represents an entirely different form of the D flip-flop, based on the principle of the block update detector. This flip-flop is small so it can be used multiple times at large integrated redstone circuits. Note that no blocks that are adjacent to the piston can be used as circuit components except flip-flop itself.

The lever in the screenshot shown is the D input. The redstone wire in the middle is trigger signal input. The trapdoor is part of the BUD – it can be replaced by a fence door, a redstone lamp (as in the diagram), etc.

JK flip-flops and latches[]

A JK flip-flop is another memory element which, like the D flip-flop, will only change its output state when triggered by a clock signal C. They can be edge-triggered (designs A, D, E) or level-triggered (C). Either way, the two inputs are called J and K. These names are arbitrary, and somewhat interchangeable: if a Q̅ output is available, swapping J and K will also swap Q and Q̅.


When the flip-flop is triggered the effect on the output Q will depend on the values of the two inputs:

  • If the input J = 1 and the input K = 0, the output Q = 1.
  • When J = 0 and K = 1, the output Q = 0.
  • If both J and K are 0, then the JK flip-flop maintains its previous state.
  • If both are 1, the output will complement itself — i.e., if Q = 1 before the clock trigger, Q = 0 afterwards.

The table summarizes these states — note that Q(t) is the new state after the trigger, while Q(t-1) represents the state before the trigger.

The JK flip-flop's complement function (when J and K are 1) is only meaningful with edge-triggered JK flip-flops, as it is an instantaneous trigger condition. With level-triggered flip-flops (e.g. design C), maintaining the clock signal at 1 for too long causes a race condition on the output. Although this race condition is not fast enough to cause the torches to burn out, it makes the complement function unreliable for level-triggered flip-flops.

The JK flip-flip is a "universal flip-flop", as it can be converted to any of the other types: It's already an RS latch, with the "forbidden" input used for toggling. To make it a T flip flop, set J = K = T, and to make it a D flip-flop, set K to the inverse of J, that is J = K̅ = D. In the real world, mass production makes JK latches useful and common: a single circuit to produce in bulk, that can be used as any other sort of latch. In Minecraft, however, JK latches are generally larger and more complex than the other types, and using their toggle function is awkward. It's almost always easier to build the specific latch type needed. Notably, an SRT Latch has all the same abilities, but gets the toggle function from a separate input.

Design E is a vertical JK Flip-Flop from the basis of design A.

Aside from these redstone designs, it is also possible to make a JK flip-flop by modifying a rail toggle, or with newer components such as hoppers and droppers.

Design table[]

Accessible Q̅?NoYesYesNo

T flip-flop[]

T flip-flops are also known as "toggles". Whenever T changes from OFF to ON, the output will toggle its state. A useful way to use T flip-flops in Minecraft could, for example, be a button connected to the input. When players press the button the output toggles (a door opens or closes), and does not toggle back when the button pops out. These are also the core of all binary counters and clocks, as they function as a "period doubler", releasing one pulse for every two received.

There are many ways to build a T flip-flop, ranging from torches and dust through pistons to more exotic devices. Many designs depend on a quirk in sticky-piston behavior, namely that after pushing a block, a sticky piston will let go of it if the activating pulse was 1 tick or less. This allows short pulses to toggle the position of a block, which is very useful here.

Best in class TFF designs[]

These are designs which seem markedly superior in various categories.

L3 is a latch, which responds to a high level. Like most T latches, if the toggle line is held high too long, it will "oscillate", toggling repeatedly. A stone button will produce a single pulse, while wooden button's pulse is long enough to cause oscillation.

L5 is a true flip-flop with the same footprint as the L3(but higher), which triggers on a rising edge. Both are extremely compact, thanks to the use of latched repeaters.

L6 is a compact 1-high adaptation of D flip-flop H. The video shows L6 and a similar T flip-flop.

L4 and L7 are basically two opposite halves of the same machine — both are extremely compact and customizable tick-wise but L4 is made for off-pulses with durations ranging from 2 to 8 redstone ticks while L7 is made for on-pulses with durations that are 9+ redstone ticks long which includes the 10-tick stone button. Customizing each requires changing the repeater delay or adding repeaters to match the trigger duration.

To customize L4 for your use, adjust the top most repeater according to the duration of your trigger, as shown in the table below:

Off-pulse Duration (Redstone Ticks)Recommended Setting for Output Repeater
- Use a Sticky Piston

- Use TFF O or L7

Piston TFF designs[]

This design doesn't use the quasi-connectivity effect, so it works in both Bedrock and Java editions. It uses a pulse generator that feeds into repeaters that power the piston through a solid block and an underground redstone dust patch. The redstone block position is the output value of the TFF. This design requires one sticky piston (for the repeater) and two non-sticky pistons, and a 6×6 area, which is linear-tilable so that the output of one TFF feeds into the next TFF.

The following designs work in Java Edition but may present difficulties in Bedrock Edition.

Design M is a 1-wide dual-piston design, which can be tiled adjacent to each other for compact circuitry. (If they don't have to be right next to each other, dust can be used instead of the input and output repeaters.) The hidden piston forms a simple monostable circuit that cuts off the button signal (10 ticks or so) as soon as a 1-tick signal has passed through to the second repeater. Due to the piston quirk mentioned above, this 1-tick signal lets the main piston toggle the position of its mobile block, to set or unset the latch and the output. It can be made more compact by removing the last block, the repeater and the torch and replacing the block in front of the last piston with a redstone block.

That linear design can also be bent into a 3×3 square, as N. (The "any" blocks can be air, and that torch can just as well be on the ground.) Tiling design N is a little tricker, but it can be done in either horizontal direction, by mirroring adjacent copies. Note that the output can be taken from whichever side of that corner is free, but the player will need repeaters to keep adjacent outputs from cross-connecting.

Design O, based on the quasi-connectivity effect that works only in Java Edition, uses a redstone block that swaps positions when the top dust receives a signal; it is a dual piston design that uses only two pistons, two torches, two dust, and two solid blocks and a redstone block. While one of the most compact designs; using only 10 blocks of space before inputs and outputs in addition to being 1 wide and vertical, it also requires no slime balls and uses few resources aside from the redstone block while allowing for four areas to input and 4 areas to output (if repeaters are used for the output, 2 if not), in addition it can be built in the air since it doesn't have any redstone or repeaters that require placement on the ground. The design toggles on a falling edge.

Design R is a variation of design O, and it adds the ability to reset the output to 0, using the input R.

Observer TFF designs (Java Edition)[]

Those designs make use of observers and the quasi-connectivity effect. Designs O1 and O2 work for a rising signal, while the O3 toggles on a falling signal.

Design table[]

DesignO1 horizontalO1 verticalO2O3
Redstone blocks1
Sticky pistons2

Other conventional TFF designs[]

This section needs cleanup to comply with the style guide. [discuss]

Please help improve this page. The talk page may contain suggestions.
Reason: There are many designs here which are not well documented, and some may be redundant or broken. Any help in describing or testing circuits would be appreciated.

Design A demonstrates that a TFF can be made solely with redstone dust and torches, but it sprawls over 9×7×3 blocks. Design B is slightly unreliable for very long pulses; while the input is on, the piston will toggle every time the block below the piston arm is updated.

Design D (another torches-and-dust design, but vertical) does not have an incorporated edge trigger and will toggle multiple times unless the input is passed through one first. Design E adds such a trigger (and a repeater).

Designs J and K make more use of repeaters, but not as latches, and they are still quite large.

Design L2, (also L3, L4, and L5 above) relies on the redstone repeater locking mechanic introduced in Java Edition 1.4.2. L4 is the smallest, but requires a piston and activates on a falling edge.

TFF summary table[]

These tables are incomplete, and need more data.

Redstone wire2814913119028
Other Devicesnone1 SPnonenonenonenone2 SP2 P3 SP
Input isolated?YesYesYesYesYesYesYesNoNo
Output(s) isolated?NoNoNoNoQ̅ onlyNoYesNoNo
Q̅ available?NoNoNoNoYesNoNoNoNo
Triggerrisingrisingrisingrisingrisingrisingrisingfallingfalling for both T and R
Delay434313 for R, 1 for T
Cycle time
Redstone wire462244
Other devices1 SPnonenonenonenonenone
Input isolated?YesYesYesNoYesYes
Output(s) isolated?YesYesYesYesQ̅ onlyNo
Q̅ available?YesNoNoNoYesYes
Delay351/2 Trigger Duration4 (Q̅)4
Cycle timeTrigger Duration6
Redstone wire44442
Other devices1 SP1 SP1 SP1 SP1 SP
Input isolated?YesYesYesYesYes
Output(s) isolated?YesYesYesYesYes
Q̅ available?NoNoNoNoNo
Cycle time
"In a void", that includes required blocks supporting redstone.
The number of ticks from the trigger to switching the output.
Cycle time
How often the latch can toggle, including any recovery time. This is the period of the fastest clock that can drive it.
Other Devices
P == normal piston, SP == sticky piston, C == comparator, H == hopper, D == dropper.
rising edge (the usual), falling edge, high or low level. Level-triggered TFFs oscillate on long pulses.

Rail and exotic TFFs[]

Pressure-Plate Rail TFF (B)

View at: Redstone circuits/Memory/TFF Rail B [edit]

The rail T flip-flop is a T flip-flop which uses rails and redstone. The general design uses a length of track that is stopped by a block at both ends. When the T flip-flop is in a stable state, the minecart is at either end of the track (depending on the state). An input pulse turns on powered rails at both ends of the track, causing the minecart to move to the other end.

Along the track, there are two separate detector elements (e.g. detector rails). These two detectors are each connected to an input of an RS NOR latch, and hence serve to translate minecart motion into a state transition. When the minecart moves, depending on its direction of motion, one detector will turn on (and off) before the other; the second detector to be hit is what determines which input of the RS NOR latch stays on last and hence what the new state of the RS NOR latch is.

Design A uses detector rails, while design B uses pressure plates. (A minecart triggers a pressure plate on the inside of a turn, including diagonals.) Note that for B, the other side of the latch isn't a true Q̅, as the passage of the cart turns on Q before actually switching the latch.

This type of T flip-flop is slower than traditional redstone-only circuits, but this may be desirable in certain situations. With T flip-flop designs that are level-triggered (as opposed to clocked or edge-triggered), a long input pulse will cause the flip-flop to continuously switch state (oscillate) while the pulse is present. In pure redstone circuits, this is only limited by the redstone circuit delays, and hence a relatively short input pulse can cause several state transitions. Pure redstone T flip-flops usually include an edge-trigger or pulse-limiting circuit to the design, since the input pulse usually can't be guaranteed to be short enough without the use of that kind of circuit.

With rail-based designs, the speed at which the output can flip is limited by the time needed for the cart to move from one end of its rail to the other, which allows for a much longer pulse to be applied to a level-triggered input without needing an edge-trigger or pulse limiter circuit. However, the delay between the input pulse and the output transition is also longer.

Grizdale's T flip-flop[]

This hopper/dropper design is not only compact, but tileable in three dimensions. The only hitch (for survival mode) is that the player needs access to nether quartz for the comparator.

The A variant has a size of 1×2×3. The B variant puts the input and output inline, but changes the footprint to 2×2×2, or 4×2×2 if players want fully powered input and output. The B design can also be tiled in line, side by side, vertically (by reversing alternate rows), or all three at once.

Once built, place a single item inside any of the containers and it will work as a T flip-flop, with the item cycling between the two droppers. The core has a 1 tick delay between input and turning off or on, but the optional repeaters would raise this to 3.

This T Flip Flop can be turned into an SRT latch by only powering the bottom dropper to set, and the top to reset. However, it won't be as tileable as the original TFF.

Obsolete T flip-flops[]

Designs Z1 and Z2 do not work as of Java Edition 1.5.2 — in both cases, their pulse generator does not cause the piston to toggle its block as apparently intended.



How To: Make Buttons Work Like Levers in Minecraft Using a T Flip-Flop

This past weekend's workshop on replacing normal levers with buttons masquerading as levers went really well. Lots of players showed up and everyone had a great time. Most importantly, everyone learned how to make and use a T flip-flop!

Why bother with a T flip-flop?

T flip-flops are so easy to make that the main question isn't how to build one, but why bother? After all, levers work well enough, right?

Yes and no! Normally, a button would only provide a brief pulse of power, but using the T flip-flop in conjunction with a button makes it act as a lever, which provides a permanent source of power. This is the simplest function of a T flip-flop, but as we learned in the workshop this past Saturday, it's much more useful than that!

T flip-flops also serve the purpose of making it easy for you to use multiple inputs for any device. With a T flip-flop, it's easy to wire buttons to your redstone machines from any location, so that you can have a potentially limitless number of buttons all controlling the same door. You no longer have to worry about whether or not you left a switch on somewhere, because with buttons, it doesn't matter!

So without further ado, let's build one!

Step 1 Drop some sticky pistons

Put down two sticky pistons, facing each other, two blocks apart.

How to Make Buttons Work Like Levers in Minecraft Using a T Flip-Flop

Step 2 Dig a hole between them

Destroy the two blocks between them on the ground.

How to Make Buttons Work Like Levers in Minecraft Using a T Flip-Flop

Step 3 Put a redstone torch in the hole

Put a redstone torch in the hole on whichever square you want the power to come from. Your output will be leading out from this square, whichever one you choose.

How to Make Buttons Work Like Levers in Minecraft Using a T Flip-Flop

Step 4 Put a block between the pistons

It doesn't matter which space you put it in, but the block must be a redstone-conductive block, which means no glass, no bedrock, etc. But it can be any conducting block.

How to Make Buttons Work Like Levers in Minecraft Using a T Flip-Flop

Step 5 Put two more blocks above it

Span the distance between the two pistons with any conductive blocks. In this case, you'll only need two.

How to Make Buttons Work Like Levers in Minecraft Using a T Flip-Flop

Step 6 Put a redstone torch at each end of your spanning blocks

One redstone torch at each end, attached to the block.

How to Make Buttons Work Like Levers in Minecraft Using a T Flip-Flop

Step 7 Run redstone across the top of it

Since there are only two blocks, you only need two bits of redstone. Since I chose netherrack to use, it's hard to see the wire in this picture, but it's there!

How to Make Buttons Work Like Levers in Minecraft Using a T Flip-Flop

Step 8 Add a button and you're done!

Now add a button anywhere on the top blocks, and that's it! You now have a working T flip-flop!

How to Make Buttons Work Like Levers in Minecraft Using a T Flip-Flop

When you press the button, the pistons will move the block below. When the block is over the redstone torch, it will power your redstone. When it isn't, your redstone will turn off.

How to Make Buttons Work Like Levers in Minecraft Using a T Flip-Flop


  • Your button doesn't have to be directly attached to your T flip-flop. Instead, simply run a length of redstone wire from the wire on top of your flip-flop to your button, and it will work perfectly!
  • If you want to use it with multiple buttons, just split up the input to multiple directions and voilà!

Don't forget...

Make sure to post anything you make using a T flip-flop to our corkboard! Our weekly Staff Choice Awards have resumed, so the more you show off your work, the more likely you are to win some cool server perks (and recognition, of course)!

Want to master Microsoft Excel and take your work-from-home job prospects to the next level? Jump-start your career with our Premium A-to-Z Microsoft Excel Training Bundle from the new Gadget Hacks Shop and get lifetime access to more than 40 hours of Basic to Advanced instruction on functions, formula, tools, and more.

Buy Now (97% off) >

Other worthwhile deals to check out:

  1. Daily readings 2021
  2. Maa ki aarti
  3. Nvidia 1070

Redstone Logic Gates: Mastering the Fundamental Building Blocks for Creating In-Game Machines

Many people get so discouraged by their failures with redstone that they give up using it entirely, or never progress beyond using simple switches. However, by incorporating logic gates into your redstone designs, the applications are nearly limitless. The ability to add multiple switches to your machines is just a small part of what logic gates can do. Most importantly, they give you control.

Redstone Logic Gates: Mastering the Fundamental Building Blocks for Creating In-Game Machines

This handy graphic above is only really half the battle. Without knowing what all of these gates do, knowing how to make them is entirely useless. Unfortunately, if you don't already have a basic knowledge of digital logic, the Minecraft Wiki doesn't really do a very good job of explaining what they are and what they do. So, if you've been frustrated by logic gates before or are interested in learning them from scratch, hold on to your butts!

The Basics

Starting from the very beginning, the term 'logic gate' just refers to an object that you put one or more inputs into and get one or more outputs from. That's it. These gates are all about input and output, and in Minecraft, as well as in digital logic, there's only two possible types of inputs and outputs—ON and OFF. Either your redstone is powered, or it isn't. That's all there is to it.

The models below are all made compact for convenience, but they can be spread out as much as you want, provided that you add enough repeaters. The important part is that all the connections remain intact, even if they're connected by long strings of redstone wire.

Simple Input/Output Gate

This one is a block with a switch on it and some redstone coming out the other end. You flip the switch on, the redstone turns on. You flip the switch off, the redstone turns off. There's a direct relationship between turning on the switch, and turning on the redstone.

Redstone Logic Gates: Mastering the Fundamental Building Blocks for Creating In-Game Machines

If you've ever powered a redstone creation with a switch, this is the type of logic gate you used. See, you probably didn't know that you've already used a logic gate!

NOT Gate

Now's where we start getting into weird, capitalized words like NOR, OR, AND, XOR, etc. Don't worry about them, because you don't have to memorize what each one does. That's what this guide is for, and I assure you that there's no test at the end!

Redstone Logic Gates: Mastering the Fundamental Building Blocks for Creating In-Game Machines

A NOT gate is exactly the same as the simple Input/Output (also referred to as an I/O) gate above, except that the output is reversed. When you turn the switch on, the redstone turns off. When you turn the switch off, the redstone turns on. You use this if you have a mechanism that you want to always be on, except when you flip a switch. Like if you want pistons to be constantly extended until you flip the switch and then they pull back, you would use a NOT gate.

AND Gate

I personally don't find too much use for AND gates because I play on a Creative Server, but there are applications for everything. An AND gate will only turn on the redstone if both levers are in the on position. This means that you can have greater control over your mechanisms.

Redstone Logic Gates: Mastering the Fundamental Building Blocks for Creating In-Game Machines

For example, say that you have one switch inside your home, and one switch outside your home and they both control the same door. If those two switches are connected by an AND gate, you can turn the switch inside your home off and no one outside your home will be able to get in, no matter how many times they flip the outside switch.

Now that's control!

OR Gate

This gate is really simple. Just two switches attached to a block with redstone coming out of it. The OR gate outputs the signal when either lever is turned on, regardless of the state of the other. When any switch is turned on, the power is turned on. So, the power only turns off when both switches are off.

Redstone Logic Gates: Mastering the Fundamental Building Blocks for Creating In-Game Machines

Using the same door example from the AND gate, this OR gate would do the exact same thing, just with a reversed power output.


A NAND gate is essentially the exact same thing as an OR gate, but reversed. That is, when either switch is on, the power is off. Again, either switch can activate the redstone by being turned off, but it can only be deactivated if both switches are on.

Redstone Logic Gates: Mastering the Fundamental Building Blocks for Creating In-Game Machines

This is useful when you want to make things like traps or doors, where you want the natural state of a piston to be on, and have it be able to be turned off at will by anyone on either side of the door.

NOR Gate

A NOR gate looks just like an OR gate with an extra redstone torch, and its functionality is opposite. While an OR gate will output power when either switch is on, a NOR gate will output power only when both levers are off.

Redstone Logic Gates: Mastering the Fundamental Building Blocks for Creating In-Game Machines

You would use this gate in similar circumstances to the AND gate, where you want to be able to control an outside switch from the inside. You would just use this one if you wanted the mechanism's at-rest state to be 'on' rather than 'off'.

XOR Gate

Whoa, things are getting a lot more complicated! No, don't worry, it really hasn't. It just looks that way in the picture below. Follow the model in the picture or in the diagram at the beginning of this guide to make one of these, and I'll tell you what it does.

Redstone Logic Gates: Mastering the Fundamental Building Blocks for Creating In-Game Machines

An XOR (usually pronounced ex-or) gate turns the power on only when one lever is off and one lever is on. Whether both switches are on or off, the power remains off. It's only when one switch is on and one is off that the redstone turns on.

This could be used if you wanted a door to be closed by pressure plates from the front or the back. If you wanted your piston-powered door to remain open until someone got close from either inside or outside, and then slam shut in their face, you would use an XOR gate. The natural state of a pressure plate is off, so if no one is standing on either of them, the power would be off. However, as soon as one person stepped onto the plate, it would turn on, closing the door. This alternately means that you could let anyone in by having someone stand on the inside and outside plates.


The XNOR gate turns the redstone on only when both levers are on, or both levers are off.

Redstone Logic Gates: Mastering the Fundamental Building Blocks for Creating In-Game Machines

Remember our door-slamming example from the XOR gate? Well, let's say that you have a pressure plate outside and a switch on the inside, and they're connected to an XNOR gate. If you turn the inside switch on, then the power will only activate while someone is standing on the pressure plate. Alternately, if you flip the inside switch off, the power will activate until someone steps on the pressure plate. So you can easily control how your machine responds to someone stepping up to the plate, so to speak!

NOR Latch

Okay, here's where things actually start to get complicated. All of the previous switches were straightforward input/output affairs. That is, given an input, your output would always be the same... they didn't change. The NOR latch changes.

A NOR latch can send power to two different outputs, whereas all the other gates we've dealt with have only had one output. However, the NOR latch will only send power to one output at a time. More complicated than that, the NOR latch will actually "remember" which switch you pulled last!

Redstone Logic Gates: Mastering the Fundamental Building Blocks for Creating In-Game Machines

If you turn one switch off, the redstone power associated with that switch will turn on. Turn it on again, and the power will turn back off. However, while that switch is turned off and the power to it is turned on, no amount of flipping the other switch on the circuit will affect the power one way or the other. Only one switch can be active at a time. Only once you turn the power off on one side can the power be activated on the other. So the power can go back and forth between the two sides depending on how you flip your switches.

This latch is great for when you have two things that you want to happen, but you don't want them to happen at the same time, like an airlock. You never want both airlock doors to be open at the same time, so you have to close one in order to open the other.

NAND Latch

The NAND latch is capable of sending power to both of its outputs simultaneously, unlike the NOR Latch. However, whichever output gets power first will retain it regardless of whether the switch is turned on or off. The power to that side will only turn off if the switch is off and the other is on. If one side's power and switch are both on, then the other side can be turned on and off at will.

Redstone Logic Gates: Mastering the Fundamental Building Blocks for Creating In-Game Machines

This is a hard one to understand! Both sides can get power at the same time, but only one side can be turned off at a time. It's hard to conceptualize, but this is essentially the opposite of the NOR latch. This, too, could power an airlock, provided that the 'closed' state of the doors required constant power.

Where the latches are concerned, I strongly recommend that you build them and test them out for yourself before incorporating them into any of your builds. Being able to actually flip the switches and see what happens is really worth it for when you're trying to understand how these work.

Rapid Pulser

This one is easy and fun! This will output to several different directions, and it will essentially freak out, turning on and off again over and over again in quick succession. This fun little guy is how we make things like machine guns or lights at a rave. If you need anything to flip on and off really quick, route it through one of these!

Redstone Logic Gates: Mastering the Fundamental Building Blocks for Creating In-Game Machines

X-Clock Pulser

This specific example of the clock pulser is known as a 5-clock because of its five blocks (or repeaters). You can add as many blocks as you'd like to this chain, and it will change how quickly it pulses. These clocks are useful for an extremely wide variety of things, but the simplest of which is when you want something to happen over and over again, but at regular intervals.

Redstone Logic Gates: Mastering the Fundamental Building Blocks for Creating In-Game Machines

For example, if you want a door to open and shut so that someone has to run through at just the right time or they get crushed, then a clock pulser is what you want!

Now Go Build!

Now that you understand what these basic logic gates do, I recommend that you make them for yourself and just experiment with them! Play with them and get a feel for them. The more you use them, the better ideas you'll have for how to incorporate them into your builds.

Above all, have fun with them!

If you still have any trouble with these logic gates, keep an eye out for our future in-depth tutorials dedicated to each specific type of gate.

Want to master Microsoft Excel and take your work-from-home job prospects to the next level? Jump-start your career with our Premium A-to-Z Microsoft Excel Training Bundle from the new Gadget Hacks Shop and get lifetime access to more than 40 hours of Basic to Advanced instruction on functions, formula, tools, and more.

Buy Now (97% off) >

Other worthwhile deals to check out:

Minecraft: How to Make Toggle Button (T-FlipFlop) Redstone Tutorials #1

Redstone Latches


Latches, also called "flip-flops", are circuits that can be switched between ON and OFF states, and stay that way until switched again. If that sounds really simple: it is!

Use latches whenever you want to turn a short signal (such as a button push, or a daylight detector switching off) into a sustained effect (such as a lamp going on, or a door staying open). There are many types of latches: here are the two easiest and most useful.

T Flip-Flop

T stands for "Toggle": push the button once to switch the light on, push it again to switch the light off.

t flip flop minecraft


This circuit makes use of the latching feature of redstone repeaters. The push button unlocks the circuit just long enough for the rest of the circuit to change state, then it locks again (why does it change state? It's really a repeater clock).

The settings of the repeaters are important: they should both be set to maximum delay (3 right clicks each) to allow the circuit to re-latch.

It is also important that the input pulse be the right length. A wooden button emits a longer pulse, so if you wanted to use one of those you'd have to add more repeaters to increase the clock delay.

RS-NOR Latch

Where the T Flip Flop is essentially an ON/OFF button, an RS-NOR latch can be seen as a circuit with separate ON and OFF buttons.

RS NOR latch

Any signal to input A will switch on Output B and switch off Output A. A signal to Input B will do the opposite.

The circuit has two sides, one of which is always on and the other is always off - they are never both on or both off. Sending an input to either side will switch that side OFF and the other side ON, almost as if the two inputs were playing tennis.

This means that for each output, one of the inputs acts as an ON button and the other acts as an OFF button.



Minecraft toggle gate

The mistress looked into the deep eyes of her toy, expecting an answer. Indeed, Petra remembered Natalie's pleasant taste, moreover, the "special diet" constantly maintained a state of agitation. She even masturbated several times, secretly from her husband, remembering the delicate bud of the hostess. And now, I lost my calm, from a passionate kiss, I already felt like in panties, it became cramped and hot.

The mistress changed the piercing ball.

Minecraft 1.17.1 Redstone On/Off Button Tutorial NO PISTONS!!

The old man muttered in confusion, - but in two weeks it will be very late. after all, we are talking, perhaps, about a completely new species. so far only I and one other person know about this, but in two weeks. You will no longer be able to credit a major opening. Ksenia bit her lip.

Now discussing:

Even before putting things in order in the family business, Inna made breasts, corrected the shape of her nose. She was already very beautiful - the correct oval of the face. black eyebrows with a break, plump lips, maybe a little tightly pursed.

1435 1436 1437 1438 1439