User:Munin295/Redstone FAQ

Circuit design
Common questions about designing a circuit.

How do I turn a button into a lever?

 * Use a T Flip-Flop.


 * A button turns on each time it is clicked, while a lever toggles its output each time it is clicked. A T flip-flop is a circuit which toggles its output each time its input turns on, so it can turn the signal from a button into the toggle output of a lever.

How do I turn a lever into a button?

 * Use a Dual Edge Detector.


 * A lever changes its output when clicked, while a button outputs a pulse when clicked. A dual edge detector is a circuit which outputs a pulse when its input changes (either from off to on, or on to off), so it can change the toggle output of a lever into the pulse of a button.

How do I detect if two or more inputs are on?
A circuit which turns on only if a certain number of inputs are on is called a "threshold gate", which is a generalization of a majority gate (which only turns on if at least half of the inputs are on).


 * Use logic gates.


 * For example, to test if two or more of three inputs (A, B, and C) is on, you could use a logic gate like this:.


 * If you need to test for exactly two inputs, the logic gets more complicated:.


 * Logic gates get complicated quickly when more inputs are added. Consider using manhattan wiring to check many possibilities simultaneously.


 * Use analog math.


 * Logic gates can get complicated when many inputs are involved. Analog math may be simpler.


 * Start with a signal strength equal to the number of inputs required to be on. For each input which turns on, subtract 1. When the signal strength reaches zero, that means enough inputs have turned on, so allow the output to turn on.

Circuit problems
Common questions about diagnosing circuit problems.

Why won't my circuit turn off?
You turn on your circuit, and everything works. But when you turn it off, everything stays powered.


 * There's a feedback loop somewhere.


 * The most common reason for this is a repeater powering a block next to or above the redstone wire which powers the repeater.

Why won't my piston retract?
You turn on your circuit, and your piston extends. But when you turn it off, the piston doesn't retract like it should.


 * It's still being activated by something else.


 * In order for a piston to retract, all of the activation sources must be turned off, not just one of them.


 * In addition, pistons can be activated by quasi-connectivity, so there might be something activating the space above the piston which is keeping it extended. If you are building near a ceiling, check that there aren't redstone circuits above the ceiling which might be powering the ceiling (the floor to them), which might activate the piston even if there is space between the piston and the ceiling.

Why does my clock stop working?
Your clock circuit is supposed to keep producing pulses forever. But it turned off, or stays permanently powered.


 * A torch burnt out.




 * It's being powered from somewhere.



Why won't my command block comparator turn off?
You activated the command block and the comparator turned on. But when you stopped activating the command block, the comparator doesn't turn off.


 * It needs to be tested again.


 * Comparators treat command blocks as containers which hold the success result of the last command executed. Command blocks continue to hold this result even after they are no longer activated, so the comparator will continue to be powered even after the signal to the command block has turned off (just as if it were a chest that still had items in it). The comparator won't change until the command block is re-activated and produces a different result (and the comparator won't turn off until the command block's command fails).


 * You can use a command block pulse limiter (schematics, right) to limit the command block's output to the same pulse length as the input.


 * Alternatively, you can run the comparator directly into another command block which uses the command to set the comparator to an unpowered state, turning the command block output into a short pulse (use repeaters between the comparator and command block to lengthen the pulse).

What is a redstone comparator used for?
Comparators can take input signals from their rear and from their sides, and output to their front (like a repeater). Depending on how they're configured, then can:


 * Maintain signal strength


 * A comparator with no side signals will output the same signal strength as its back input.


 * Compare this to redstone which loses signal strength, or a repeater which always outputs the maximum signal strength of 15.


 * Compare signal strength


 * If a comparator is in "comparison mode" (front torch down/off, right-click to change), then it will only output its rear input if the rear signal is stronger than or equal to both side signals – if the rear input is weaker, the output shuts off.


 * Subtract signal strength


 * If a comparator is in "subtraction mode" (front torch up/on, right-click to change), then the output will equal its rear signal minus the strongest side signal (except the output can't drop below 0).


 * Measure containers


 * A comparator will output a signal strength in proportion to how full a container behind it is (and some other things).

Putting these things together in various ways allows you to make many different kinds of circuits (logic, pulse, clock, memory, etc.).

Comparators are probably most frequently used for their ability to measure containers. Hopper clocks use them to detect when items have finished moving in one direction, item sorters use them to detect when a new item has been filtered out, item elevators use them to detect when an item needs to be moved up, etc.

The other things a comparator can do (maintain, compare, and subtract signal strength) are mostly used in (somewhat advanced) "analog" circuits which perform calculations on signal strength.

How do I build a computer in Minecraft?

 * It's really really complicated.


 * First, you need to actually understand how a computer works.
 * For most people, this is a college/university-level study, but mathematically/logically-inclined teens and pre-teens may be able to work through the topics, even without the math a college/university-level course would require.
 * Start with Wikipedia — for example, computer architecture, instruction set, and arithmetic logic unit.
 * Second, you need to make design choices about how your computer will work.
 * How will numbers be represented? Two's complement is a common choice for integers, but will your computer need to handle other data types and structures (floating-point numbers, strings, arrays, etc.)?
 * What instructions will it be able to execute (its "instruction set")?
 * Third, plan the layout of your computer.
 * What parts need to talk to other parts, so should be close together?
 * How will the user input data, and how will that connect to the rest of the computer?
 * How will the computer display results to the user, and how will the computer drive that display?
 * Fourth, build it.
 * This can take months or years. I'm not kidding.
 * Fifth, realize how little you can actually do with it.
 * But seriously, you'll still get like five people telling you it's amazing.


 * Copy someone else's computer.


 * You're done! And you didn't have to learn anything!