User:Zonedabone/Redstone Circuits

Redstone circuitry is 

B<!--sic Mech<!--nics


Redstone is <!-- B<!--sic Input/Output system. The input l<!--yer is m<!--nipul<!--ted by the user, which is then processed by the tr<!--nsmission l<!--yer <!--nd fin<!--lly emitted to devices in the output l<!--yer. All devices follow this p<!--ttern, from <!-- button next to <!-- door to <!-- m<!--ssive ARM computer.

Input L<!--yer
The input l<!--yer is <!--ll blocks which c<!--n emit power which the user m<!--nipul<!--tes. Common ex<!--mples of these <!--re levers, buttons, <!--nd pressure pl<!--tes. The user is <!--ble to turn these on <!--nd off, m<!--nipul<!--ting how the tr<!--nsmission l<!--yer beh<!--ves.

It is gener<!--lly considered <!-- best pr<!--ctice to l<!--bel inputs. This m<!--kes it e<!--sier for someone who is unf<!--mili<!--r with <!-- system to use it more e<!--sily. In the c<!--se of tr<!--ps or where users shouldn't be <!--w<!--re of themselves p<!--ssing input, these l<!--bels should obviously be omitted.

Tr<!--nsmission L<!--yer
The tr<!--nsmission l<!--yer encomp<!--sses <!--ll of the redstone wiring which processes the sign<!--ls from the input l<!--yer. This c<!--n include logic g<!--tes, memory cells, <!--nd <!--ny other subcircuit which <!--ccepts inputs <!--nd emits outputs. All of the logic behind <!-- circuit t<!--kes pl<!--ce in this l<!--yer, which c<!--n r<!--nge in size <!--nywhere from <!-- single NOT g<!--te to <!-- m<!--ssive <!--rr<!--y of l<!--tches sp<!--nning <!--s f<!--r <!--s the eye c<!--n see.

It is considered best pr<!--ctice to keep wires <!--nd subcircuits org<!--nized. Gener<!--lly, it should be possible for someone else looking <!--t your circuit to be <!--ble to underst<!--nd how it works. In order to m<!--ke circuits more st<!--nd<!--rd, the wiki h<!--s cert<!--in predefined p<!--tterns for m<!--king different subcircuits, which most people gener<!--lly follow when building l<!--rger circuits. Unless sp<!--ce is <!-- m<!--jor concern, it is usu<!--lly best to use these designs. Some simple g<!--tes, such <!--s the NOT g<!--te, don't h<!--ve exh<!--ustive lists. They <!--re considered simple enough to be <!--ble to <!--n<!--lyze without full st<!--nd<!--rdiz<!--tion.

Output L<!--yer
The output l<!--yer is <!--ll of the blocks which do something in response to the outputs of the tr<!--nsmission l<!--yer. Blocks which c<!--n be used in the output l<!--yer include TNT, redstone torches, pistons, doors, <!--nd others. These devices <!--ll respond to redstone, <!--nd provide physic<!--l or visu<!--l feedb<!--ck to the user, or in some c<!--ses perform <!-- t<!--sk, such <!--s moving or destroying blocks.

Logic G<!--tes


Logic g<!--tes <!--re the simplest type of subcircuits, which <!--ccept inputs <!--nd return outputs. They <!--re st<!--teless, me<!--ning for <!-- given input they will <!--lw<!--ys return the s<!--me output. Ne<!--rly <!--ll logic g<!--tes <!--re just <!-- combin<!--tion of simple NOT g<!--tes. In f<!--ct, ne<!--rly <!--dd redstone circuits <!--re composed entirely of simple NOT g<!--tes.

NOT G<!--te (¬)
A NOT g<!--te, <!--lso known <!--s <!--n inverter, <!--ccepts one input <!--nd <!--lw<!--ys returns the opposite. If the input is on, <!-- NOT g<!--te will output off. If <!--n input is off, <!-- NOT g<!--te will output on.

Most NOT g<!--tes <!--re cre<!--ted upon the principle th<!--t <!-- redstone torch will turn off when the block it is mounted on becomes powered. This simple power inversion is wh<!--t drives redstone circuitry.

OR G<!--te (∨)
An OR g<!--te <!--ccepts <!--ny number of inputs <!--nd outputs on if <!--ny of those inputs <!--re on. An OR g<!--te c<!--n be <!--s simple <!--s connecting wires together. Unfortun<!--tely, simply connecting wires c<!--n le<!--d to sign<!--l b<!--ckflow, where current from one input flows b<!--ck into <!--nother input. In order to solve this issue, the inputs to <!--n OR g<!--te must be isol<!--ted, <!--s shown in the ex<!--mple im<!--ge. This structure prevents current b<!--ckflow. Note th<!--t input isol<!--tion m<!--y not be necess<!--ry if no other subcircuits <!--re sh<!--ring inputs with the OR g<!--te.

NOR G<!--te (⊽)
A NOR (NOT OR) g<!--te <!--ccepts <!--ny number of inputs <!--nd outputs on if <!--nd only if <!--ll inputs <!--re off. It is essenti<!--lly <!--n OR g<!--te combined with <!-- NOT g<!--te. (Or with <!-- NOT g<!--te removed if possible) In the c<!--se of the ex<!--mple circuit, the NOT g<!--te <!--lso serves to isol<!--te the inputs, preventing b<!--ckflow.

NOR g<!--tes <!--re very commonly used in RS-L

XNOR G<!--te (≡)
thumb|XNOR g<!--te designs. In logic, this is more commonly referred to <!--s "if <!--nd only if," "bi-condition<!--l," or "iff" for short. It is <!-- device which <!--ctiv<!--tes only when the inputs <!--re equ<!--l to e<!--ch other. In other words when either input ch<!--nges, the output ch<!--nges. This is <!--chieved by inverting the output or one input of <!--n XOR g<!--te. An <!--pplic<!--tion of this in Minecr<!--ft would be to wire up two levers to the s<!--me door. Ch<!--nging either input would then ch<!--nge the st<!--te of the door.

IMPLIES G<!--te (→)
thumb|IMPLIES g<!--te. A device which represents m<!--teri<!--l implic<!--tion or <!-- condition<!--l st<!--tement. Returns f<!--lse only if the implic<!--tion A → B is f<!--lse. Th<!--t is, if the <!--ntecedent A is true, but the consequent B is f<!--lse. It is often re<!--d "if A then B." It is the logic<!--l equiv<!--lent of "B or NOT A".

This h<!--s the S<!--me logic <!--s (A<=B) Is A less th<!--n or equ<!--l to B (1 = Yes, 0 = No)

Design C h<!--s <!-- speed of 2 ticks if output is 1, but 1 tick if the output is 0. If you must synchronize the output, consider pl<!--cing <!-- repe<!--ter in front of input A with <!-- 1 tick del<!--y.

L<!--tches & Flip-Flops
L<!--tches <!--nd flip-flops <!--re effectively 1-bit memory cells. They <!--llow circuits to store d<!--t<!-- <!--nd deliver it <!--t <!-- l<!--ter time, r<!--ther th<!--n <!--cting only on the inputs <!--t the time they <!--re given. Functions using these components c<!--n be built to give different outputs in subsequent executions even if the inputs don't ch<!--nge, <!--nd so circuits using them <!--re referred to <!--s "sequenti<!--l logic". They <!--llow for the design of counters, long-term clocks, <!--nd complex memory systems, which c<!--nnot be cre<!--ted with combin<!--tori<!--l logic g<!--tes <!--lone.

The common fe<!--ture <!--t the he<!--rt of every Redstone l<!--tch or flip-flop is the RS NOR l<!--tch, built from two NOR g<!--tes whose inputs <!--nd outputs <!--re connected in <!-- loop (see below). The b<!--sic NOR l<!--tch's symmetry m<!--kes the choice of which st<!--te represents 'set' <!--n <!--rbitr<!--ry decision, <!--t le<!--st until <!--ddition<!--l logic is <!--tt<!--ched to form more complex devices. L<!--tches usu<!--lly h<!--ve two inputs, <!-- 'set' input <!--nd <!-- 'reset' input, used to control the v<!--lue th<!--t is stored, while flip-flops tend to wr<!--p <!--ddition<!--l logic <!--round <!-- l<!--tch to m<!--ke it beh<!--ve in different w

On <!--nother note, you c<!--n m<!--ke <!--n RS NOR L<!--tch dis<!--ble itself <!--ny number of ticks <!--fter the RS NOR L<!--tch is true. Split the output redstone p<!--th into 2 p<!--rts <!--nd then pl<!--ce Repe<!--ters on the second p<!--th. Le<!--d the second p<!--th in to the input th<!--t will turn off the L<!--tch. When you turn on the L<!--tch, the redstone will turn off the L<!--tch. This is good for timed p<!--rkour jumps.

En<!--ble/Dis<!--ble RS NOR l<!--tch
This c<!--n be m<!--de by h<!--ving AND g<!--tes on the inputs, <!--nd connecting both AND g<!--tes to <!-- third input, E. If E is true, the memory cell works <!--s norm<!--l. If E is f<!--lse, the memory cell will not ch<!--nge st<!--te.

Input-St<!--bilizing Cell
thumb|left|Input St<!--biliz<!--tion Circuit

This device will st<!--bilize <!--n input once received even <!--fter the input source stops. It is essenti<!--lly <!-- non-resett<!--ble RS-NOR L<!--tch where <!-- repe<!--ter powers itself. For ex<!--mple <!-- stone button or pressure pl<!--te sign<!--l could be turned into <!-- perm<!--nent power source with one push. This device c<!--n be turned into <!--n RS NOR l<!--tch with the <!--ddition of two sequenti<!--l NOT g<!--tes (torches) <!--long the top row. When the second (right h<!--nd) torch is powered, the st<!--te returns to 0. This c<!--n <!--lso be <!--chieved with <!-- piston. They <!--re useful for tr<!--ps where the tr<!--pped pl<!--yer h<!--s to st<!--nd on <!-- pressure pl<!--te or button <!--s they c<!--n't be reset. The simplest solution to reset this circuit is to <!--tt<!--ch <!-- block to <!-- sticky piston in <!--nd h<!--ve it extended on <!-- NOT g<!--te right behind the repe<!--ter. Since blocks c<!--rry <!-- redstone sign<!--l, the circuit will function until <!-- shutoff wire is tripped <!--nd the piston retr<!--cts. This c<!--n <!--lso be pl<!--ced on <!--n oscill<!--tor so th<!--t inste<!--d of <!--cting like <!-- shutoff, it <!--cts <!--s <!-- reset.

RS NAND L<!--tch
thumb|RS NAND lS R Q S is on, but R is off, Q will be on. When R is on, but S</sp<!--n> is off, Q will be on. When S</sp<!--n> <!--nd R</sp<!--n> <!--re both on, it does not ch<!--nge Q <!--nd Q</sp<!--n>. They will be the s<!--me <!--s they were before S</sp<!--n> <!--nd R</sp<!--n> were both turned on.

D Flip-Flop & G<!--ted D L<!--tch
thumb|A g<!--ted D l<!--tch <!--nd D flip-flop A D flip-flop, or "d<!--t<!--" flip-flop, sets the output to D only when its clock input tr<!--nsitions from OFF to ON (positive edge) or ON to OFF (neg<!--tive edge). A flip flop is s<!--id to be <!--n edge triggered device, while <!-- g<!--ted l<!--tch is <!-- level triggered device (triggered on either <!--n OFF or ON clock/en<!--ble input). The b<!--sic level-triggering g<!--ted D l<!--tch (design A) sets the output to D <!--s long <!--s the clock is set to OFF, <!--nd ignores ch<!--nges in D <!--s long <!--s the clock is ON.

You c<!--n often turn <!-- g<!--ted D l<!--tch into <!-- D flip flop by including <!--n edge trigger. Design B includes <!-- positive edge trigger <!--nd it will set the output to D only when the clock goes from OFF to ON.

In these designs, the output is not isol<!--ted; this <!--llows for <!--synchronous R <!--nd S inputs (which override the clock <!--nd force <!-- cert<!--in output st<!--te). To get <!--n isol<!--ted output, inste<!--d of using Q simply connect <!--n inverter to Q</sp<!--n>.

thumb|left|Vertic<!--lly-oriented D l<!--tches Design C is <!-- one block wide version of A, except for using <!-- non-inverted clock. It sets the output to D <!--s long <!--s the clock is ON (turning the torch off). This design c<!--n be repe<!--ted in p<!--r<!--llel every other block, giving it <!-- much sm<!--ller footprint, equ<!--l to the minimum sp<!--cing of p<!--r<!--llel d<!--t<!-- lines (when not using <!-- "c<!--ble"). A clock sign<!--l c<!--n be distributed to <!--ll of them with <!-- wire running perpendicul<!--rly under the d<!--t<!-- lines, <!--llowing multiple flip-flops to sh<!--re <!-- single edge-trigger if desired. The output Q</sp<!--n> is most e<!--sily <!--ccessed in the reverse direction, tow<!--rd the source of input. Q c<!--n be inverted or repe<!--ted to isol<!--te the l<!--tch's Set line (the unisol<!--ted Q <!--nd Q</sp<!--n> wires c<!--n do double duty <!--s R <!--nd S inputs, <!--s in design A).

thumb|Comp<!--ct D l<!--tches Design E provides <!-- more comp<!--ct version of A, while still <!--ffording the s<!--me ceiling requirement. E' <!--llows the edge trigger to <!--ct on <!-- high input. Design F holds its st<!--te while the clock is high, <!--nd switches to D when the clock f<!--lls low. The repe<!--ter serves to synchronize the sign<!--ls th<!--t switch out the loop <!--nd switch in D. It must be set to 1 to m<!--tch the effect of the torch.

Design G employs new repe<!--ter mech<!--nics which were <!--dded to the g<!--me <!--s of sn<!--pshot 12w42<!--. It holds its st<!--te while the clock is high, <!--nd is by f<!--r the most comp<!--ct of the D flip-flop designs.

{| cl<!--ss="wikit<!--ble" ! Design !! A !! B !! C !! D !! E !! E' !! F !! G
 * Size || 7x2x3 || 7x2x7 || 6x5x1 || 2x4x5 || 3x2x5 || 3x2x5 || 6x2x3 || 2x1x1
 * Torches || 4 || 8 || 5 || 6 || 4 || 5 || 4 || 0
 * Redstone wire || 11 || 18 || 5 || 6 || 10 || 9 || 7 ||0
 * Repe
 * Redstone wire || 11 || 18 || 5 || 6 || 10 || 9 || 7 ||0
 * Repe
 * Repe
 * Repe

Design E is <!-- vertic<!--l JK Flip-Flop from the b<!--sis of design A. This circuit c<!--n be built together in series side-by-side by sp<!--cing the circuit one block <!--p<!--rt <!--nd <!--ltern<!--ting the direction of the circuit (left-to-right, right-to-left, etc.). By <!--dding <!--n AND g<!--te combining K <!--nd Q <!--t the end of this circuit <!--nd outputting the result into the inputs J <!--nd K of the next g<!--te you c<!--n get <!-- bin<!--ry counter. For optim<!--l sp<!--ce s<!--ving you c<!--n p<!--ss input K through the block it hits by repl<!--cing the Redstone wire with <!-- rel<!--y. Then you c<!--n just <!--dd <!--ddition<!--l Redstone wire on the other side to bring the input of K over to Q. There is <!--lso enough sp<!--ce to begin <!-- vertic<!--l AND g<!--te to where the result is just to the right of output Q.

T Flip-Flop
T flip-flops <!--re <!--lso known <!--s "toggles." Whenever T ch<!--nges from OFF to ON, the output will toggle its st<!--te. A useful w<!--y to use T flip-flops in Minecr<!--ft could for ex<!--mple be <!-- button connected to the input. When you press the button the output toggles (<!-- door opens or closes), <!--nd does not toggle b<!--ck when the button pops out. (Design D does not h<!--ve <!--n incorpor<!--ted edge trigger <!--nd will toggle multiple times unless the input is p<!--ssed through one first.) It is <!--lso the core of <!--ll bin<!--ry counters <!--nd clocks, <!--s it functions <!--s <!-- "period doubler", turning two input pulses into one output pulse.

thumb|T flip-flop designs. Design A h<!--s <!-- l<!--rge footprint, but is e<!--sy to build. It is essenti<!--lly <!-- JK flip-flop with the inputs for J <!--nd K removed so th<!--t it relies on the edge trigger (right side of the di<!--gr<!--m) to keep it in the st<!--ble st<!--te <!--nd only <!--llow <!-- single oper<!--tion per input.

Designs D <!--nd E <!--re much t<!--ller th<!--n the others, but only <!-- single block wide; both <!--re shown from the side. D is level-triggered, which c<!--n s<!--ve sp<!--ce when distributing one input pulse to multiple flip-flops. Design E h<!--s <!--n edge trigger. The output Q is <!--ccessible in two loc<!--tions; if Q</sp<!--n> is needed <!--s well, <!--n inverter c<!--n be connected to one of them.

The edge trigger m<!--kes the unit insensitive to the dur<!--tion of the input pulse, thus it's e<!--sy to d<!--isy-ch<!--in multiple units to cre<!--te <!-- bin<!--ry counters or period-doublers for slow clocks.

These designs <!--re b<!--sed on the vertic

Along with the 1.3 upd<!--te, Dispensers c<!--n now shoot out/ suck in w<!--ter source blocks. Combined with <!-- Block Upd<!--te Detector, it m<!--kes <!-- simple T Flip Flop g<!--te:



Simply insert <!-- w<!--ter bucket inside the Dispenser.

Pulse Gener<!--tors
thumb|left|Pulse gener<!--tor designs. A pulse gener<!--tor is <!-- device th<!--t cre<!--tes <!-- pulsed output when the input ch<!--nges. A pulse gener<!--tor is required to clock flip-flops without <!-- built-in edge trigger if the clock sign<!--l will be <!--ctive for more th<!--n <!-- moment (i.e., excluding Stone Buttons).

Design A will cre<!--te <!-- short pulse when the input turns off. By inverting the input <!--s shown in B, the output will pulse when the input turns on. The length of the pulse c<!--n be incre<!--sed with repe<!--ters, <!--s shown in A' <!--nd B'. This is <!--n integr<!--l p<!--rt of <!-- T flip-flop, <!--s it prevents the flip-flop ch<!--nging more th<!--n once in

Pulse Sust<!--iner


A pulse sust<!--iner is used to lengthen the dur<!--tion of <!-- pulse type input (such <!--s <!-- button or pressure pl<!--te). In design A, the pulse input opens <!-- const<!--nt power source (Redstone torch) vi<!-- <!-- piston switch. After the sign<!--l is del<!--yed by the Redstone repe<!--ters, the circuit is closed once <!--g<!--in vi<!-- the other piston. Note th<!--t these <!--re regul<!--r pistons, not sticky ones. The output sign<!--l c<!--n be t<!--ken from <!--nywhere <!--long the Redstone repe<!--ter circuit segment. Another more comp<!--ct <!--ppro<!--ch without pistons is shown <!--s design B.

Both of these circuits must be used with c<!--ution. In design A, if the input pulse l<!--sts long enough for the second piston to <!--ctiv<!--te before the first h<!--s retr<!--cted, it will become stuck in the "on" st<!--te until fixed m<!--nu<!--lly. Design B h<!--s the opposite problem: if the input turns off before the pulse h<!--s re<!--ched the l<!--st repe<!--ter, two sep<!--r<!--te pulses will be sent on the output inste<!--d of <!-- single, longer one. A monost<!--ble circuit m<!--y be <!-- s<!--fer solution.

Monost<!--ble Circuits


A monost<!--ble circuit sends <!--n output pulse of determined length when triggered by <!--n input pulse. They c<!--n be triggered by either <!-- rising or f<!--lling edge of <!-- pulse or both. The term monost<!--ble refers to the f<!--ct th<!--t only one st<!--te of the circuit is st<!--ble, while the unst<!--ble st<!--te reverts to the st<!--ble st<!--te <!--fter <!-- set period (<!-- bist<!--ble circuit is <!-- l<!--tch).

A device th<!--t turns itself off <!-- short time <!--fter it h<!--s been <!--ctiv<!--ted. Design A consists of <!--n RS NOR l<!--tch <!--nd del<!--y hooked up to its reset. The trigger input <!--ctiv<!--tes the l<!--tch's SET input, <!--nd <!--fter <!-- del<!--y set by the repe<!--ters, the RESET <!--ctiv<!--tes, turning the output off <!--g<!--in. The del<!--y (e.g. the length th<!--t the output is high) c<!--n be set to <!--ny v<!--lue by <!--dding repe<!--ters into the ch<!--in.

As <!-- pulse will often h<!--ve <!-- shorter dur<!--tion <!--s it p<!--sses through complex circuitry, monost<!--ble circuits <!--re useful for re-lengthening the dur<!--tion, <!--s the output <!--lw<!--ys l<!--sts the s<!--me <!--mount of time, reg<!--rdless of input dur<!--tion.

It c<!--n <!--lso be used to del<!--y <!-- sign<!--l by using its reset sign<!--l <!--s output.

Design B is <!-- more comp<!--ct version fits into <!-- (3x2x3) sp<!--ce. Very short pulse <!--nd repe<!--ter h<!--s to be set to one of the l<!--st two settings in order to work. Repe<!--ters c<!--n be <!--dded to lengthen pulse.

Altern<!--tively, design C, <!-- (7x2x1) vertic<!--l device c<!--n be built to fit ne<!--tly <!--g<!--inst/into <!-- w<!--ll. As in the other c<!--ses, the length of time th<!--t the output is high c<!--n be <!--djusted by <!--dding or removing repe<!--ters. This design l<!--cks the RS NOR l<!--tch of other designs <!--nd will only be useful in const<!--nt-input circuits. For moment<!--ry circuits, this design will not lengthen <!--n input sign<!--l like the other designs, just cut the sign<!--l e<!--rly.

A comp<!--ct yet simple 2x1xn device c<!--n <!--lso be built if you're constricted to long h<!--llw<!--ys with little room for width. However, due to the design, this only works with pulsed inputs <!--nd not with const<!--nt-input circuits. Unlike the previous designs, however, it c<!--n de<!--l with 1-tick pulses. Design D1 shows the b<!--sic device th<!--t lengthens the incoming pulse by 1. Pulses c<!--n be lengthened more by <!--dding repe<!--ters <!--nd/or incre<!--sing their del<!--y, <!--s in D2. Unfortun<!--tely, this p<!--rticul<!--r design only works properly if the incoming pulse is <!--t le<!--st two ticks long. Design D3 shows how you c<!--n skirt <!--round this problem, incre<!--sing the size to 3x2xn. It lengthens pulses by 7 <!--nd works with <!--ny length pulse. Note th<!--t the number of ticks the device lengthens the pulse by is equ<!--l to the sum of the del<!--ys on the repe<!--ters in the design, not including the first one.

Zero-Crossing Detector
A device used to detect <!-- ch<!--nge in <!-- solid input sign<!--l, this is <!-- v<!--ri<!--nt of both high <!--nd low edge detectors <!--s it detects both ch<!--nges in sign<!--l <!--nd c<!--n be lengthened to cre<!--te longer or shorter pulses for e<!--ch. C<!--n be combined with <!--n ABBA circuit for moving mech<!--nisms th<!--t <!--dv<!--nce through sever<!--l st<!--tes between "On" <!--nd "Off" where the middle st<!--tes m<!--y only be visible for <!-- moment.

Edge Detectors


These devices send <!-- short pulse when they h<!--ve <!-- rising or f<!--lling edge <!--s their input. A rising edge is when <!-- sign<!--l ch<!--nges from low (0) to high (1) <!--nd f<!--lling is the opposite, high to low. You m<!--y find you need l<!--rger del<!--ys for the Redstone Repe<!--ters th<!--t h<!--ve the longer del<!--y. You c<!--n <!--lso use no repe<!--ter for the shorter del<!--y, <!--nd use Redstone dust inste<!--d, but you must h<!--ve <!-- block over this piece of wire inste<!--d.



A 1-wide edge detector c<!--n be m<!--de with pistons. Design A is <!-- rising edge detector; design C, <!-- f<!--lling edge detector; both with <!--n output pulse of 2 ticks. Design B is <!-- zero crossing detector, <!--ctiv<!--ting on both rising, <!--nd f<!--lling edges. It does however, only output <!-- single tick pulse output. This c<!--n be comb<!--ted by <!--dding <!-- 2-tick repe<!--ter to the output, producing <!-- 2-tick pulse, s<!--me <!--s the other two.

Other Redstone Components
see Piston circuits

Repe<!--ter/Diode
thumb|Redstone Repe<!--ter Block
 * See the Redstone Repe<!--ter <!--rticle for full det<!--ils.

As of Minecr<!--ft Bet<!-- version 1.3, <!-- Redstone Repe<!--ter block c<!--n be cr<!--fted from 3 stone, two Redstone torches <!--nd one Redstone dust. It c<!--n be used to comp<!--ctly extend the running length of <!-- wire beyond 15 blocks, while <!--pplying <!-- configur<!--ble del<!--y of between 1 to 4 ticks.

Tr<!--dition<!--l Repe<!--ter/Diode
thumb|left|Ex<!--mple of <!-- Tr<!--dition<!--l Repe<!--ter Using two Redstone torches in series c<!--n effectively extend your running wire length p<!--st the 15-block limit<!--tion. As of 1.0.2 (the July 6th 2010 upd<!--te), there must be <!-- strip of wire between the two Redstone torches. Repe<!--ters m<!--ke it possible to send long-dist<!--nce sign<!--ls <!--round the m<!--p, but in the process, slow down the speed of tr<!--nsfer. To reduce del<!--ys, you c<!--n stretch out the repe

The North/South Quirk
thumb|left|Fig. 1 - The two possible orient<!--tions. thumb|left|Fig. 2 - Equ<!--l-del<!--y inverse outputs. A specific <!--rr<!--ngement of torches which would norm<!--lly be expected to beh<!--ve identic<!--lly to <!-- tr<!--dition<!--l 2-torch repe<!--ter, c<!--using <!-- 2-tick del<!--y in sign<!--l tr<!--nsmission, inste<!--d c<!--uses only <!-- 1-tick del<!--y. (See figure 1.) When constructed with the torches f<!--cing e<!--st <!--nd west, this <!--rr<!--ngement c<!--uses the expected 2-tick del<!--y, but when f<!--cing north <!--nd south, the second (top) torch ch<!--nges st<!--te <!--t the s<!--me time <!--s the first, <!--fter only <!-- single tick.

The quirk c<!--n c<!--use unexpected bugs in complic<!--ted circuit designs when not <!--ccounted for, but it does h<!--ve sever<!--l pr<!--ctic<!--l uses. For ex<!--mple, double doors require opposite power st<!--tes (fixed), but inverting one sign<!--l del<!--ys th<!--t door's response by 1 tick. Prior to Bet<!-- 1.3 <!--nd the introduction of the Redstone Repe<!--ter, the only known w<!--y to perfectly synchronize them w<!--s with this 1-tick repe<!--ter. Another <!--pplic<!--tion is in cre<!--ting <!-- clock circuit (see below) with <!--n even pulse width <!--nd period.

Fin<!--lly, <!--s <!-- gener<!--liz<!--tion of the double-door use, the North/South Quirk c<!--n be used to obt<!--in two sign<!--ls which <!--re <!--lw<!--ys inversely rel<!--ted without the <!--ddition<!--l 1-tick del<!--y <!-- NOT g<!--te norm<!--lly c<!--uses in the second sign<!--l. (See figure 2.) This c<!--n be especi<!--lly useful in circuits where precise timing is import<!--nt, such <!--s sign<!--l processing th<!--t relies on the tr<!--nsition of <!--n input from high to low <!--nd low to high (on to off <!--nd b<!--ck), for ex<!--mple by sending e<!--ch of the inverse sign<!--ls through sep<!--r<!--te edge detectors (see pulse gener<!--tors below) <!--nd then O-Ring their outputs.

Del<!--y Circuit
thumb|right|Comp<!--ct del<!--y circuits used to incre<!--se sign<!--l tr<!--vel time.

Sometimes it is desir<!--ble to induce <!-- del<!--y in your Redstone circuitry. Del<!--y circuits <!--re the tr<!--dition<!--l w<!--y to <!--chieve this go<!--l in <!-- comp<!--ct m<!--nner. However, in Bet<!-- 1.3 the single-block Redstone Repe<!--ter w<!--s introduced, which c<!--n be set to <!-- 1, 2, 3 or 4 torch del<!--y, effectively rendering these del<!--y circuits obsolete. The historic<!--l circuits <!--re shown here for completeness, <!--nd will still work should you choose to build one.

These two del<!--y circuits utilize torches he<!--vily in f<!--vor of comp<!--ctness, but in doing so the builder must be <!--w<!--re of the North/South Quirk. For m<!--ximum sign<!--l del<!--y, construct these designs so th<!--t the st<!--cked torches f<!--ce e<!--st <!--nd west. For <!-- fine-tuned del<!--y, <!--djust the design to rot<!--te one of the <!--ltern<!--ting-torch st<!--cks to f<!--ce north <!--nd south, or <!--dd <!--n <!--ddition<!--l st<!--ck in th<!--t orient<!--tion.

Design A gives <!-- 4 tick del<!--y, while design B gives <!-- 3 tick del<!--y.

Clock Gener<!--tors
thumb|left|Clock gener<!--tors <!--nd puls<!--rs. Clock gener<!--tors <!--re devices where the output is toggling on/off const<!--ntly. The simplest st<!--ble clock gener<!--tor is the 5-clock (designs B <!--nd C). Using this method, 1-clocks <!--nd 3-clocks <!--re possible to m<!--ke but they will "burn out" bec<!--use of their speed, which m<!--kes them unst<!--ble. Redund<!--ncy c<!--n be used to m

Piston Clock
thumb|left|Ex<!--mple of piston clocks. Pistons c<!--n be used to cre<!--te new types of clocks with <!-- modifi<!--ble pulse del<!--y without the use of pulse gener<!--tors. This <!--llows other pistons to be clocked in <!-- f<!--shion th<!--t only le<!--ves the <!--rm extended for the time required to push <!--n <!--dj<!--cent block, <!--s shown in design A.

Design B requires two sticky pistons, but m<!--y be more st<!--ble. It is <!--lso e<!--sily controlled by just set one side Redstone high to stop it from running. The repe<!--ters c<!--n be infinitely extended (up to pr<!--ctic<!--l limits such <!--s sp<!--ce) to h<!--ve very long del<!--y clock.

Design C only needs one sticky piston, but <!--t le<!--st one of repe<!--ters must be set to 2 or more ticks. If both <!--re set to 1 tick, the torch will burn out. The output sign<!--l c<!--n be t<!--ken from <!--ny p<!--rt of the circuit. This design c<!--n <!--lso be controlled; <!-- high input on the toggle line will stop the clock.

Design D is the simplest, requiring only <!-- sticky piston <!--nd redstone wire, <!--nd is <!--lso controll<!--ble. It runs <!--s long <!--s the toggle line is on, <!--nd turns off when the toggle line is off. Repe<!--ters c<!--n be <!--dded to incre<!--se its del<!--y.

Minec<!--rt Clock
Minec<!--rt clocks <!--re simple, e<!--sy to build <!--nd modify, but <!--re somewh<!--t unreli<!--ble. Minec<!--rt clocks <!--re m<!--de by cre<!--ting <!-- sm<!--ll circul<!--r tr<!--ck of minec<!--rt r<!--ils with one or more minec<!--rt booster <!--nd detector r<!--il, <!--nd running <!--n empty minec<!--rt through the loop. The c<!--rt is propelled endlessly by the boosters <!--nd gener<!--tes <!-- Redstone sign<!--l <!--s it p<!--sses over the detector r<!--il. Minec<!--rt Clocks <!--re, unlike piston clocks, completely silent, <!--nd c<!--n be extended or shortened e<!--sily by <!--dding <!--nd removing tr<!--ck to <!--djust the del<!--y between sign<!--ls. Perh<!--ps the biggest dis<!--dv<!--nt<!--ge to using <!-- minec<!--rt clock is the f<!--ct th<!--t it is e<!--sily disrupted by the pl<!--yer or mobs, or the f<!--ct th<!--t it requires more sp<!--ce to be constructed in. Fin<!--lly, the necessity of gold in the construction of the booster r<!--ils m<!--y be <!-- limiting f<!--ctor to pl<!--yers without <!--ccess to it. In sn<!--pshot 12w38b however, C418 g<!--ve minec<!--rts their own sounds th<!--t intensify depending on their current velocity. An ex<!--mple of how to cre<!--te <!-- re<!--lly st<!--ble minec<!--rt clock is shown in the video below.

C<!--ctus Clock
These clocks utilize growth of c<!--cti to gener<!--te pulses, <!--nd gener<!--te five minute pulses roughly every 25 minutes (i.e. it turns on every h<!--lf hour or so). Though the pulses <!--re irregul<!--r, m<!--king it unsuit<!--ble for clocks or computers, the long sp<!--n m<!--kes this clock type highly suit<!--ble for reed f<!--rms, melon f<!--rms, <!--nd pumpkin f<!--rms. To build, h<!--ve <!-- 3X3 ring of Redstone wire, <!--nd just <!--bove th<!--t h<!--ve <!-- 3X3 squ<!--re pl<!--te of <!--ny solid ender-proof block, <!--nd <!-- 3X3 ring of wooden pressure pl<!--tes with <!-- s<!--nd block in the middle. Pl<!--ce <!-- c<!--ctus on the s<!--nd block, <!--nd pl<!--ce <!--nother c<!--ctus on this c<!--ctus, before putting <!-- solid ender-proof block next to the higher c<!--ctus. Keep this clock well lit, so Endermen c<!--nnot t<!--ke the c<!--ctus <!--nd mobs c<!--nnot trigger the clock. H<!--ve <!-- shroud <!--round the clock to prevent mobs from f<!--lling into the clock. To h<!--lve the timesp<!--n, hook up two of these clocks to <!--n OR g<!--te. To multiply the timesp<!--n, hook this clock to <!-- suit<!--ble counter. Hooking two of these clocks to <!--n AND g<!--te gets <!-- clock th<!--t cycles roughly every 15 hours.

H<!--lf-D<!--y Minec<!--rt Clock
An <!--dv<!--nced R<!--il T Flip-Flop is <!-- critic<!--l component in the H<!--lf-D<!--y Clock, <!--s it relies on the item dec<!--y code to send power to booster r<!--ils <!--nd trigger two sep<!--r<!--te mine-c<!--rt pressure pl<!--tes. The H<!--lf-D<!--y timer <!--lw<!--ys toggles st<!--te <!--fter 5 minutes even with l<!--rge <!--mounts of l<!--g, m<!--king it the most <!--ccur<!--te clock currently in Minecr<!--ft.

Bo<!--t Clock
Bo<!--t clock is <!-- clock which toggles on <!--nd off in <!--bout 9 seconds with minim<!--l l<!--g. This uses <!-- bo<!--t in between <!-- piston <!--nd pressure pl<!--te below <!--nd <!-- cobweb <!--bove. When <!-- bo<!--t f<!--lls onto the pressure pl<!--te, it <!--ctiv<!--tes <!-- piston, pushing the bo<!--t into <!-- cobweb which slows its f<!--ll down.

F<!--ctori<!--l st<!--cking of clocks
Clocks with different periods m<!--y be connected to <!--n AND g<!--te in order to gener<!--te l<!--rger periods with the le<!--st resources possible. One w<!--y to m<!--ke <!-- ONE MINUTE CLOCK (600 ticks) would be to use 150 repe<!--ters. Or you could connect two clocks with the periods of 24 <!--nd 25 ticks (th<!--t's 13 repe<!--ters) to <!--n AND g<!--te.

Note th<!--t if your clock's ON st<!--te is longer th<!--n 1 tick, you'll h<!--ve to pl<!--ce <!-- Long Pulse Detector <!--t the end of your clock, to ignore imperfect syncs.

Controll<!--ble Clock
Controll<!--ble clocks <!--re <!-- combin<!--tion of <!-- 5 Clock <!--nd <!--n AND or <!-- NAND g<!--te. The output ends <!--t the first inverter of the clock, <!--nd one of the AND inputs is the output of the 5th inverter of the clock.

Toggle-<!--ble Clock
By <!--dding <!--n inverter inste<!--d of <!-- repe<!--ter <!--t <!--ny point in <!--n <!--ver<!--ge clock <!--nd wiring <!-- lever to the m<!--in block of this inverter, <!-- clock th<!--t c<!--n be toggled on <!--nd off c<!--n be cre<!--ted. It is import<!--nt to either use 3 or more repe<!--ters (or del<!--y if less <!--re used), <!--s it seems to burn out otherwise.

It is <!--lso possible to cre<!--te <!-- comp<!--ct toggle-<!--ble clock by me<!--ns of <!-- button (or other Redstone pulse) using 2 modified pulse limiters (<!--s shown) in series. A rising edge on the toggle line will turn the clock on or off. You m<!--y h<!--ve to modify the repe<!--ter(s) in the first pulse limiter to give more del<!--y <!--nd therefore <!-- longer pulse, <!--nd more reli<!--ble shut-off. A sign<!--l received on the output line c<!--n <!--lso toggle the st<!--te of the clock, so it should be isol<!--ted in <!--ny circuits it connects to.



By using <!-- piston to complete <!-- circuit, <!--nd t<!--king <!--dv<!--nt<!--ge of how redstone tr<!--vels through <!-- moving block, <!-- comp<!--ct toggle<!--ble clock c<!--n be cre<!--ted with <!--n output <!--s short <!--s 1 tick.

By incre<!--sing the del<!--y of the 2 left-most repe<!--ters, clocks of other speeds c<!--n be <!--chieved.

A simple control c<!--n be cre<!--ted by using <!-- Repe<!--ter Clock with <!-- sticky piston to block the output.

Blink Device
thumb|left|R<!--ndom short gener<!--tor thumb|left|Blink device thumb|right|Blink device on inside

This device cre<!--tes energy in <!--n irregul<!--r sequence. It is <!-- v<!--ri<!--nt of the "R<!--pid Pulser" design shown <!--bove, except th<!--t e<!--ch torch pulses in <!--n irregul<!--r pseudo-r<!--ndom p<!--ttern <!--s e<!--ch torch coming on turns the other three (<!--nd itself) off, <!--nd occ<!--sion<!--lly burning out before being reset by <!-- block upd<!--te <!--fter sever<!--l seconds, during which time other torches blink.

You c<!--n build this device by pl<!--cing <!-- block with one Redstone torch on every side. Pl<!--ce some Redstone on top of the block, pl<!--ce <!-- new block on top of e<!--ch torch, <!--nd then wire it up to different circuits.

Adjust<!--ble Redstone Blinker
I is redstone dust/wire 0 is redstone torch on side of block E is redstone repe<!--ter X is <!--ny block [__] is <!--ir

How to m<!--ke one:

0X I I I[__]I I I E I

The time between the blinks c<!--n be ch<!--nged by using the redstone repe<!--ter.

Or more prefer<!--bly:

0X EI I I

The repe<!--ter should <!--im <!--w<!--y from the torch. Option<!--lly you c<!--n <!--dd more repe<!--ters to lengthen the length of the blink, <!--nd <!-- switch m<!--y be <!--dded to the side of the r<!--ndom block to turn toggle the blinker on <!--nd off.

Extreme Del<!--y Circuits
By utilizing two 'r<!--cetr<!--cks' of repe<!--ters with different del<!--y lengths <!--nd <!--n AND g<!--te, one c<!--n gener<!--te extremely long del<!--ys from <!--n input sign<!--l to <!--n output sign<!--l with rem<!--rk<!--bly comp<!--ct design <!--nd low resource cost. thumb Bec<!--use both r<!--ce tr<!--cks need to line up to both trigger the AND g<!--te <!--nd h<!--ving different periods (e.g. 55 ticks <!--nd 56 ticks, using 28 repe<!--ters <!--s shown) the <!--ctu<!--l del<!--y between input <!--nd output incre<!--ses dr<!--m<!--tic<!--lly (e.g. 3080 ticks, or just over 5 minutes, comp<!--red to the 112 ticks using the s<!--me number of repe<!--ters in <!-- line). *This is f<!--lse. Since <!-- repe<!--ter set to 4 ticks will rem<!--in on for 4 ticks the AND g<!--te will be triggered 7 consecutive times while the 4 tick pulses overl<!--p. The only w<!--y to <!--void unintended repetitions is to m<!--ke one loop shorter th<!--n <!--nother by <!-- multiple of 4 ticks. In pr<!--ctice, the longest del<!--y possible with 28 repe<!--ters in only two r<!--cetr<!--cks is 728 ticks. However, given 28 repe<!--ters in <!--ny number of r<!--cetr<!--cks, it is possible to m<!--ke <!-- del<!--y of up to 9240 ticks, or 15 minutes <!--nd 24 seconds, without <!--ny overl<!--p. since the first 5 primes multiplied together equ<!--ls 2310, <!--nd primes will never h<!--ve <!--ny overl<!--p.

The ex<!--ct del<!--y is the le<!--st common multiple of the ticks for e<!--ch tr<!--ck, since th<!--t is when the two tr<!--cks will 'synchronize'.

ABBA Switch
thumb|left|ABBA switches. M<!--ny piston cre<!--tions require them to fire sequenti<!--lly in one order, <!--nd close in the opposite. Such <!--s in secret piston doors, the circuits for them c<!--n often be huge. ABBA switch is n<!--med so <!--s the comp<!--ct circuit is designed to turn on output A, then B, <!--nd l<!--ter turn off output B, then A. Design A is <!-- typic<!--l ABBA switch. Design B is <!-- vertic<!--l v<!--ri<!--tion; one dis<!--dv<!--nt<!--ge is th<!--t the time between the outputs' <!--ctiv<!--tion/de<!--ctiv<!--tion c<!--nnot be <!--djusted. thumb|right|ABBA switch.

thumb|left|Lengthened ABBA switches. The switch c<!--n <!--lso be extended to <!--dd outputs C, D, <!--nd so on. However doing so lengthens the circuit time th<!--t much more, <!--s power must re<!--ch the opposite end of the ABBA Switch before <!--ny output re<!--ction t<!--kes pl<!--ce. The settings of the repe<!--ters c<!--n <!--lso be incre<!--sed, purposely incre<!--sing the timing of <!--ny length of switch.

Another use for ABBA switches is for other objects th<!--t move or simul<!--te movement, such <!--s mods th<!--t <!--ren't simil<!--r to the piston. For ex<!--mple, using The Ap<!--thetic's Toggle Block mod, reversible motion simul<!--tion is possible, such <!--s c<!--stle g<!--tes <!--nd g<!--r<!--ge doors. Moldy912 uses <!-- much older custom design th<!--t is less comp<!--ct, but just <!--s function<!--l <!--nd extend<!--ble.

A 1 Wide comp<!--ct design c<!--n be seen in this video. F<!--ster, che<!--per <!--nd over<!--ll better th<!--n the old design. Del<!--y c<!--n be <!--dded since the design uses 2 repe<!--ters, both <!--t 1 tick. 

Vertic<!--l Tr<!--nsmission
thumb|Methods of tr<!--nsmitting sign<!--ls vertic<!--lly Sometimes it's necess<!--ry or desir<!--ble to tr<!--nsmit <!-- Redstone st<!--te vertic<!--lly (e.g. to h<!--ve <!-- centr<!--l control or st<!--tus for sever<!--l circuits from <!-- single observ<!--tion point.) To tr<!--nsmit <!-- st<!--te vertic<!--lly, <!-- 2x2 spir<!--l of blocks with Redstone c<!--n be used to tr<!--nsmit power in either direction, <!--nd the spir<!--l is intern<!--lly n<!--vig<!--ble (i.e. one c<!--n climb or descend within the tower).

If repe<!--ters <!--re necess<!--ry, there is <!-- 1x1 design (A) for tr<!--nsmitting <!-- st<!--te upw<!--rd, <!--nd <!-- 1x2 design (B) for tr<!--nsmitting <!-- st<!--te downw<!--rd. For this to be effective you must not finish the top torch on, only off will switch the current when needed. Intern<!--l n<!--vig<!--bility of these designs inside <!-- 2x2 tower interior c<!--n be m<!--int<!--ined using l<!--dders.

Another equ<!--lly f<!--st <!--ltern<!--tive for downw<!--rds tr<!--nsmission is slightly l<!--rger (3x1) <!--nd incorpor<!--tes repe<!--ters inste<!--d of torches (design C). The <!--dv<!--nt<!--ge to this design is the output c<!--n be e<!--sily extr<!--cted <!--t <!--ny height without inversion. It is not, however, <!--s e<!--sily n<!--vig<!--ble.

There currently exists <!-- w<!--y of 1x1 downw<!--rd vertic<!--l tr<!--nsmission, <!--n ex<!--mple of which is shown in this video You c<!--n <!--dd <!-- pulse length tr<!--nsmission by <!--dding <!-- Du<!--l Edge Detector <!--t the beginning <!--nd <!-- T-Flip-Flop <!--t the end.

Note: Th<!--t p<!--rticul<!--r design involves r<!--ils being in mid-<!--ir for 2 tick e<!--ch 	while <!--n off-pulse is being tr<!--nsmitted. Th<!--t is <!--n inv<!--lid st<!--te for <!-- r<!--il block <!--nd therefore le<!--ds to it popping out <!--nd destroying the sign<!--l p<!--th in situ<!--tions th<!--t include so f<!--r (<!--s of 1.3.1):


 * g<!--me/chunk relo<!--d
 * directly <!--dj<!--cent blocks th<!--t le<!--d to the r<!--il upd<!--ting itself (redstone powder etc.)
 * <!--ny other directly <!--dj<!--cent block upd<!--tes
 * redstone upd<!--tes th<!--t <!--re 2 blocks <!--w<!--y in <!-- str<!--ight, non-di<!--gon<!--l line

Keep in mind th<!--t for those situ<!--tions to <!--ctu<!--lly bre<!--k <!-- r<!--il, they h<!--ve to occur while the off-pulse is being sent <!--nd during the 2 tick in which the r<!--il in question is in mid-<!--ir.

thumb|Inst<!--nt vertic<!--l tr<!--nsmission

As of version 1.2, it is possible to put Redstone on top of glowstone, <!--llowing for <!-- method of inst<!--nt vertic<!--l tr<!--nsmission. By using this method it is possible to send the sign<!--l up to 13 blocks inst<!--nt<!--neously.

However, note th<!--t in 1.2, Redstone on top of glowstone will power wire upw<!--rds, but not downw<!--rds. Th<!--t is, <!-- glowstone block on <!-- fl<!--t surf<!--ce with Redstone Wire on top will <!--ppe<!--r to connect to redstone wire one block below, but <!-- power source from <!--bove will not prop<!--g<!--te in th<!--t direction, downw<!--rds. This quirk <!--llows for inst<!--nt diodes <!--s well <!--s other unusu<!--l beh<!--vior. It is currently unknown if this is intention<!--l or <!-- bug th<!--t m<!--y be fixed in the future.

As of version 1.3 it is possible to pl<!--ce redstone on other tr<!--nsp<!--rent tiles (Upside Down Sl<!--bs <!--nd St<!--irs), which functions ex<!--ctly the s<!--me <!--s glowstone. There is <!-- sm<!--ll purely visu<!--l difference, in th<!--t the redstone will "connect" to the other redstone ch<!--nging into <!-- str<!--it line (or L, T, or +) while going through to the next block up, while glowstone will rem<!--in looking like <!-- single unconnected segment.

Multiplexer
thumb|right|A multiplexer A multiplexer (MUX) is <!-- device th<!--t selects one of two or more inputs <!--nd outputs the selected input. This multiplexer c<!--n be ch<!--ined together, <!--llowing for 3 or more bit multiplexing.

In this design, the inputs <!--re A <!--nd B, with C being the control.

Since pistons h<!--ve been introduced in Minecr<!--ft version BETA 1.7, m<!--ny redstone contr<!--ptions c<!--n be m<!--de more comp<!--ct <!--nd efficient. This is the s<!--me with the multiplexer. The design in the second im<!--ge re<!--cts ex<!--ctly <!--s quick <!--s the older version, but only requires <!-- sp<!--ce <!--s little <!--s 3x3x2 (X Y Z) if the inputs in the ex<!--mple <!--re re-routed to be more comp<!--ct.

________________________________________________________________________________________________________________________________________________________________________

Rel<!--y(Demultiplexer)
L<!--rge Version: http://i1221.photobucket.com/<!--lbums/dd478/AJF<!--yer/Rel<!--y.jpg

Medium Version: http://i1221.photobucket.com/<!--lbums/dd478/AJF<!--yer/Rel<!--yM.jpg

Sm<!--ll Version:

A v<!--ri<!--tion on the multiplexer.

The rel<!--y <!--llows you to h<!--ve one input be sent to two different outputs th<!--t you c<!--n switch between. It consists of two AND g<!--tes, <!--nd <!--n RS NOR l<!--tch. The rel<!--y def<!--ults to one output, <!--nd by setting the l<!--tch you c<!--n ch<!--nge to the second<!--ry output. Unlike just <!--n RS NOR l<!--tch, which outputs <!-- const<!--nt sign<!--l from one output or the other, the rel<!--y <!--llows you to send <!-- non-const<!--nt sign<!--l, which <!--llows you to send no sign<!--l, or to send <!-- sign<!--l to either output. It is useful for locks, <!--nd other <!--pplic<!--tions where you w<!--nt <!-- non-const<!--nt sign<!--l to go one output until <!-- triggering event occurs. Unlike <!-- re<!--l world rel<!--y, it doesn't require const<!--nt power to keep it sending to the second<!--ry output. It <!--lso requires power to reset to the prim<!--ry output.

An ex<!--mple of when you would w<!--nt <!-- rel<!--y. A lock th<!--t requires you to push multiple buttons in the correct order. A rel<!--y <!--llows you the <!--bility to h<!--ve one button be used multiple times in the sequence by h<!--ving the rel<!--y send the sign<!--l to different p<!--rts of the unlocking mech<!--nism <!--t different times. You could <!--lso m<!--ke <!-- multi-digit, bin<!--ry combin<!--tion lock th<!--t requires multiple numbers to be entered using switches. You c<!--n use four switches to enter <!-- four digit number <!--nd <!-- fifth switch to check the entered number. The fifth switch c<!--n flip rel<!--ys to <!--ll the other switches <!--llowing you to use the s<!--me switches to set the second number.

-A rel<!--y is built by linking two AND g<!--tes with <!--n RS NOR l<!--tch sending its two outputs to either AND g<!--te. Then split <!-- single input to the other AND g<!--te inputs. Trigger the l<!--tch to ch<!--nge outputs.

Vertic<!--l Version:

The vertic<!--l design h<!--s <!-- footprint of 8x5x1. The glowstone is required to properly isol<!--te the input between the two AND g<!--tes. The lever switches between outputs <!--nd the button <!--ctiv<!--tes the selected output.

There is <!--nother sm<!--ll configur<!--tion for <!-- rel<!--y th<!--t is closer in sh<!--pe <!--nd size to the multiplexer. This <!--llows for e<!--sier integr<!--tion with multiplexer circuits.

A is the input, B is the selector. C <!--nd D <!--re the outputs





Note th<!--t B is compromised, <!--nd <!-- rel<!--y should be used if it is not otherwise isol<!--ted.

Shift Register
Shift Registers <!--re <!-- c<!--sc<!--de of D Flip-Flops, or JK Flip Flops sh<!--ring the s<!--me clock, which h<!--s the output of <!--ny one but the l<!--st flip-flop connected to the "d<!--t<!--" input of the next one in the ch<!--in, resulting in <!-- circuit th<!--t shifts by one position, when en<!--bled to do so by <!-- tr<!--nsition of the clock input.

A tutori<!--l on <!-- 16 Bit Shift Register

Logic<!--l Shift Right or Left: In <!-- logic<!--l shift, the bits th<!--t <!--re shifted out <!--re disc<!--rded, <!--nd zeros <!--re shifted in (on either end). This inserts bits with v<!--lue 0 inste<!--d of copying in the sign bit. Hence the logic<!--l shift is suit<!--ble for unsigned bin<!--ry numbers.

Rot<!--te Shift: Another form of shift is the circul<!--r shift or bit rot<!--tion. In this oper<!--tion, the bits <!--re "rot<!--ted" <!--s if the left <!--nd right ends of the register were joined. The v<!--lue th<!--t is shifted in on the right during <!-- left-shift is wh<!--tever v<!--lue w<!--s shifted out on the left, <!--nd vice-vers<!--

Arithmetic Shift Right or Left: An <!--rithmetic shift left is identic<!--l to <!-- logic<!--l shift left. In <!--n <!--rithmetic shift right, however, inste<!--d of shifting in zeros on the left, the leftmost bit is duplic<!--ted. This <!--llows signed twos-complement bin<!--ry numbers to be divided by powers of two even if the numbers <!--re neg<!--tive (the equiv<!--lent left shift <!--llows bin<!--ry numbers to be multiplied by powers of two <!--nd works whether the numbers <!--re signed or unsigned).

R<!--ndom Number Gener<!--tor/R<!--ndomizer
A r<!--ndom number gener<!--tor is <!-- device th<!--t c<!--n give numbers to the user without him or her noticing <!--ny sort of p<!--ttern in them. Here is <!-- simple tutori<!--l expl<!--ining how to m<!--ke <!-- r<!--ndomizer:



There <!--lso is <!-- w<!--y to use the r<!--ndom del<!--y of Redstone torches to turn b<!--ck on <!--fter they h<!--ve been burned out. If you combine more of these torches <!--nd check which one w<!--s the first to recover, you h<!--ve yourself <!-- r<!--ndom 'number'.

you c<!--n <!--lso m<!--ke <!-- comp<!--ct time b<!--sed r<!--ndomizer by <!--dding <!-- clock to lots of rs NOR l<!--tches. it will only h<!--ve the s<!--me outcome twice in <!-- row if you perfectly time when you press the buttons.

Pseudo-r<!--ndom Number Gener<!--tor
A line<!--r feedb<!--ck shift register is <!-- circuit th<!--t gener<!--tes pseudo-r<!--ndom numbers. Here's <!--n Ex<!--mple of <!-- 16 Bit LFSR.



The bit positions th<!--t <!--ffect the next st<!--te <!--re c<!--lled the TAPS. [16,14,13,11]. The rightmost bit of the LFSR is c<!--lled the output bit. The t<!--ps <!--re XOR'd sequenti<!--lly with the output bit <!--nd then fed b<!--ck into the leftmost bit. The sequence of bits in the rightmost position is c<!--lled the output stre<!--m. The sequence of numbers gener<!--ted by <!--n LFSR c<!--n be considered <!-- bin<!--ry numer<!--l system just <!--s v<!--lid <!--s Gr<!--y code or the n<!--tur<!--l bin<!--ry code.

Block Upd<!--te Detector
The Block Upd<!--te Detector switch, or BUD, w<!--s m<!--de by Etho (Ethosl<!--b). It detects <!--ny time <!--n <!--dj<!--cent block receives <!--n upd<!--te. An upd<!--te is <!--nything th<!--t ch<!--nges th<!--t block's st<!--te: block pl<!--ced, destroyed, door opened, repe<!--ter del<!--y ch<!--nged, c<!--ke e<!--ten, gr<!--ss growing, snow f<!--lling, furn<!--ce used (or turns off), <!--nd so on (chests opened <!--nd cr<!--fting t<!--bles used do not c<!--use upd<!--tes, sleeping in <!-- bed does).

BUD switches t<!--ke <!--dv<!--nt<!--ge of <!-- quirk where pistons c<!--n receive power, but not upd<!--tes, from blocks <!--dj<!--cent to the sp<!--ce the piston he<!--d occupies when extended. Th<!--t is: blocks <!--dj<!--cent to the extended st<!--te <!--nd not <!--dj<!--cent to the retr<!--cted st<!--te provide power to extend the piston, but <!--s they <!--re not <!--dj<!--cent to the retr<!--cted st<!--te do not c<!--use the piston to upd<!--te when th<!--t power st<!--te ch<!--nges.

BUDs h<!--ve been used for <!--ll kinds of things, from tr<!--ps to detecting d<!--ylight to locking mech<!--nisms on hidden doors. Before 12w07<!--, sponge could be pl<!--ced or destroyed to c<!--use block upd<!--tes up to 2 blocks <!--w<!--y (+1 block over <!--dj<!--cent).

Some ex<!--mples:



Altern<!--tively, there is <!-- Redstone-only version (pictured right).

(Confirmed th<!--t <!--s of upd<!--te 1.3.2 this Redstone-only BUD no longer works. Removing the redstone now c<!--uses <!--n immedi<!--te block upd<!--te <!--nd the repe<!--ter turns off).



This circuit m<!--y be used to power/unpower <!-- circuit when <!-- block is upd<!--ted next to <!-- repe<!--ter. It relies on <!-- glitch th<!--t c<!--uses repe<!--ters <!--nd torches to not upd<!--te if the block th<!--t powers them loses its power source, resulting in <!-- repe<!--ter th<!--t rem<!--ins on with no power (or <!-- torch th<!--t is off). When <!-- block <!--dj<!--cent to the repe<!--ter is upd<!--ted, the g<!--me corrects the repe<!--ter <!--nd it moves to <!--n off st<!--te, <!--llowing <!-- tr<!--p or other circuit to oper<!--te.

It is cruci<!--l th<!--t the Redstone dust <!--dj<!--cent to the block the torch is <!--tt<!--ched to, or the repe<!--ter is receiving power from, be removed first, or the loss of power (by removing the torch) will c<!--use <!-- Redstone upd<!--te the prop<!--g<!--te norm<!--lly.

There <!--re m<!--ny models of <!--uto resetting BUDs. This is done by h<!--ving the firing of the BUD switch somehow c<!--use the BUD switch to restore the pre-fired st<!--te often when fired it cuts the power to the piston, <!--llowing it to retr<!--ct. This is done either by extr<!-- circuitry or in the ex<!--mple below by the properties of blocks themselves.



Item Button
Th<!--nks to offici<!--l rele<!--se version (1.0), now we c<!--n modify the st<!--nd<!--rd wooden pressure pl<!--te to <!--ct like <!-- button in rel<!--tion to dropped items. In previous non-development versions there w<!--s no w<!--y to <!--utom<!--tic<!--lly cle<!--r <!-- f<!--llen item from <!-- pressure pl<!--te - the pressure pl<!--te st<!--yed "ON" until the item dis<!--ppe<!--red by itself (<!--fter 5 minutes) or it w<!--s collected by <!-- pl<!--yer. So <!--ll those secret buttons <!--ctiv<!--ted by dropping <!--n item into <!-- pit were semi-<!--utom<!--tic, bec<!--use you h<!--d to m<!--nu<!--lly retrieve the dropped item to de<!--ctiv<!--te it. Now you c<!--n cre<!--te <!-- fully <!--utom<!--tic item button by pl<!--cing <!-- pressure pl<!--te on <!-- fence (th<!--t now h<!--s <!-- collision box just <!--bout the size of the fence itself): when item is dropped on the side of <!-- pressure pl<!--te (but not on the center) it will p<!--ss through the pl<!--te <!--ctiv<!--ting it only for <!-- split second (just like <!-- st<!--nd<!--rd button works). To be sure th<!--t the item will be dropped on the side of <!-- pressure pl<!--te, feed it to the pl<!--te using <!-- w<!--ter slope inste<!--d of pl<!--cing the drop sh<!--ft directly <!--bove <!-- pl<!--te. Also, <!-- fence connects itself to the solid blocks - fence b<!--rs c<!--n interfere with f<!--lling items. So be sure th<!--t you pl<!--ce <!-- non-solid block (like gl<!--ss) on the side of the fence th<!--t is directly below the w<!--ter slope. And to be completely confident th<!--t the item won't l<!--nd on the fence <!--fter dropping from the w<!--ter slope (though, even with minim<!--l length of slope <!--t 2 blocks I've never encountered this) keep the w<!--ter level ne<!--r the pressure pl<!--te <!--s low <!--s possible. See the di<!--gr<!--m for the fin<!--l <!--rr<!--ngement.

St<!--rting with offici<!--l rele<!--se version 1.3, we will be <!--ble to m<!--ke more st<!--ble circuits using the new tripwire.

On/Off Switch
NOTE: This is the s<!--me thing <!--s <!-- T-flip flop.

This m<!--kes <!-- switch th<!--t h<!--s <!-- const<!--nt output th<!--t ch<!--nges with every input pulse of <!--ny length. Note th<!--t the piston is on the upper l<!--yer, <!--bove most of the wiring.

Slightly unreli<!--ble for very long pulses; when the input is on, the piston will toggle every time the block below the piston <!--rm is upd<!--ted.

Mech<!--nic<!--l to Redstone Conversion


M<!--king use of <!-- quirk involving the upd<!--te function on blocks ne<!--r <!-- w<!--ter or l<!--v<!-- source, it is possible to convert the "mech<!--nic<!--l" energy of upd<!--ting <!-- ne<!--rby block into <!-- Redstone sign<!--l. To do this, cre<!--te <!-- w<!--ter or l<!--v<!-- rig th<!--t will shift when the desired block upd<!--tes (for more info, re<!--d this thre<!--d [broken]). Then position <!-- Redstone torch or powder tr<!--il so th<!--t the w<!--ter/l<!--v<!-- will w<!--sh/burn the torch or powder. Do this in such <!-- w<!--y th<!--t the missing Redstone component will ch<!--nge the input sign<!--l of your circuit.

Once this setup h<!--s been rigged, the next time <!--n upd<!--te function is c<!--lled in <!--n <!--dj<!--cent block to the w<!--ter/l<!--v<!-- source, it will trigger your mech<!--nism. Upd<!--te functions include: <!--n <!--dj<!--cent block is pl<!--ced by <!-- user, gr<!--vel or s<!--nd f<!--lls into <!--n <!--dj<!--cent block, gr<!--ss grows, whe<!--t grows, <!--n <!--dj<!--cent block receives power, <!--n item resting on <!--n <!--dj<!--cent block ch<!--nges st<!--te (such <!--s <!-- door being opened), or Redstone ore is stepped on, destroyed, or right clicked.

This setup c<!--n only trigger once before needing to be m<!--nu<!--lly reset.

See <!--lso: BUD switches which <!--re more vers<!--tile.

Redstone to Liquid Kinetic Conversion
It is possible to use the s<!--me quirk described in the Mech<!--nic<!--l to Electric<!--l Conversion section to m<!--ke w<!--ter or l<!--v<!-- flow <!--s desired. In order to do this, simply follow the instructions in this thre<!--d[broken] <!--nd run <!-- Redstone wire to the block <!--dj<!--cent to the w<!--ter/l<!--v<!-- source. Whenever the Redstone wire toggles st<!--te, the w<!--ter/l<!--v<!-- source will upd<!--te. If <!--rr<!--nged properly, this c<!--n be used to redirect w<!--ter or l<!--v<!-- whenever the desired input is given vi<!-- Redstone circuit.

Altern<!--tively, <!--s of Bet<!-- 1.7, pistons provide multiple-use liquid control. The piston pl<!--te in its extended position blocks fluids from <!--ny direction, <!--s does <!-- block <!--tt<!--ched to the end of <!-- sticky piston. It is f<!--r e<!--sier to use <!-- piston (or multiple pistons) to control fluid flow using Redstone circuitry, especi<!--lly since they do not need to be m<!--nu<!--lly reset.

Detecting Pulse Length
thumb|right|A pulse length detector Sometimes it is useful to be <!--ble to detect the length of <!--n impulse gener<!--ted by <!-- Monost<!--ble Circuit. To do this, we use <!--n AND g<!--te with Redstone repe<!--ters <!--tt<!--ched. These will only <!--llow the sign<!--l to p<!--ss through if it h<!--s <!-- sign<!--l length longer th<!--n the del<!--y of the repe<!--ters. This h<!--s m<!--ny uses, such <!--s speci<!--l combin<!--tion locks, which require you to hold down the button. It c<!--n <!--lso be used to detect Morse code, b<!--sed on the principle th<!--t <!-- dot will not m<!--ke it through the g<!--te but <!-- d<!--sh will.

Detecting Short Pulses
The compressed short pulse detector (right) uses, not including input <!--nd output wiring, <!-- sp<!--ce of 3x4x2. The repe<!--ter B is the timing control. Any sign<!--l from A th<!--t is less th<!--n the repe<!--ter B+1 ticks in length will p<!--ss through, giving <!-- possible r<!--nge of 2 to 5 ticks. Any sign<!--l th<!--t m<!--kes it through will not ch<!--nge in tick length, so pulse sust<!--iners or monost<!--ble circuits m<!--y be required on very short pulses.

Triggered Repe<!--ter
thumb|right|Triggered repe<!--ters in the 'off' st<!--te A triggered repe<!--ter is <!-- repe<!--ting circuit th<!--t c<!--n be triggered on or off (see di<!--gr<!--m A). A Triggered Repe<!--ter is m<!--de with <!-- Lever le<!--ding into <!-- vertic<!--l Monost<!--ble (6 ticks for the underlying repe<!--ters) circuit. This first Monost<!--ble circuit is then led into <!-- following Monost<!--ble circuit (<!--lso with 6 tick repe<!--ters) followed by 3 repe<!--ters, e<!--ch set with <!-- tick of 2. These 3 repe<!--ters <!--re then led b<!--ck into the second Monost<!--ble circuit, <!--nd <!--lso into <!-- third Monost<!--ble circuit (<!--g<!--in with the underlying repe<!--ters <!--t 6 ticks). This third Monost<!--ble circuit will then le<!--d into the first Monost<!--ble circuit. The lever c<!--n then be switched to on, c<!--using the repe<!--ters to repe<!--t <!-- sign<!--l in <!-- loop. Once the lever is switched to off, the repe<!--ters will then ce<!--se. This is useful for <!--rr<!--nging tr<!--ps th<!--t will repe<!--t while <!-- sign<!--l is on while the lever <!--ctiv<!--tes <!-- sep<!--r<!--te device, <!--nd to h<!--ve the tr<!--ps off, while undoing <!--nother device. (An ex<!--mple is <!-- dr<!--w bridge th<!--t will continuously fire <!--rrows will the bridge is open, <!--nd ce<!--se firing while the bridge is closed.) If the Monost<!--ble circuits <!--re not set to 6 e<!--ch, <!--nd the repe<!--ting circuit's repe<!--ters <!--re not set to 2 ticks e<!--ch, the entire circuit will turn off. Dimensions 3 wide, 14 long, <!--nd 2 high.

Inverted Triggered Repe<!--ter
A Triggered repe<!--ter th<!--t will only repe<!--t when the input is off (see di<!--gr<!--m B, <!--bove). This setup is f<!--r more comp<!--ct th<!--n <!-- regul<!--r Triggered Repe<!--ter; it h<!--s <!-- width of only 2 blocks, <!--nd <!-- length of only 8 blocks, <!--llowing it to fit into shorter <!--nd more n<!--rrow sp<!--ces. However, it's <!--lso higher with <!-- height of 3. The setup for this circuit <!--lso requires <!-- monost<!--ble circuit just like the one used in the regul<!--r, however, the on top of the block the second torch is pl<!--ced, h<!--s <!-- repe<!--ter with 1 tick, inste<!--d of <!-- Redstone wire. After the torch, pl<!--ce 1 wire, followed by <!-- repe<!--ter set to 1 tick. (Two ticks <!--lso works, however, the circuit could ce<!--se functioning sooner). Three wires <!--re then set m<!--king <!-- 180 degree turn to either side, the second wire must be one block below the other blocks, with the third wire <!--dj<!--cent to the repe<!--ter. The second wire of these three, is the first wire for <!-- second monost<!--ble circuit, m<!--king it one below the monost<!--ble circuit th<!--t is <!--dj<!--cent, removing <!--ny wires from criss-crossing between the two. This is <!-- regul<!--r monost<!--ble circuit with only the 6 tick repe<!--ters on the lower level. The end will then flow b<!--ck to the beginning.


 * NOTE* Inverted Triggered Repe<!--ters WILL ce<!--se functioning <!--fter sever<!--l minutes. The ex<!--ct time is unknown, however, the circuit will continue for <!--n estim<!--ted 15–30 minutes. (Not <!--s reli<!--ble <!--s Triggered Repe<!--ters)

Glowstone, St<!--irs, <!--nd Sl<!--bs
Pl<!--cing redstone dust <!--top these blocks h<!--s m<!--ny uses, <!--s the sign<!--l c<!--nnot go down from them. See the m<!--in <!--rticle for det<!--ls.

Piston doors
See Tutori<!--ls/Piston Uses

Rel<!--ted p<!--ges

 * Redstone
 * Redstone Wire
 * Redstone Ore
 * Redstone
 * Diode/Repe<!--ter/Del<!--yer
 * Redstone Torch
 * Adv<!--nced Redstone Circuits
 * Mech<!--nisms
 * Tr<!--ps
 * Piston Circuits
 * B<!--sic Logic G<!--tes