# How to build a two bit binary to decimal decoder using Redstone?

This is the logic circuit i want to create in Minecraft

Can anyone make one for me because the one I am making is having lots of problems and is too messy. Redstone signals get jammed and they stay turned on even after switching off the lever.

I hope you're not trying to construct this from basic gates. It could be argued either way, but fundamentally, I see binary decoders in Minecraft as functioning with nor gates instead of nand gates, but that's beside the point. Essentially, the best way to create a binary decoder is to treat it like a field-programmable gate array (FPGA), where horizontal input lanes are nor-ed together on the vertical output lanes. That's a bit of a wishy-washy statement, so it's probably better just to show you.

In this instance, there is a counter as the input, but it's just as easy to use levers for the input. There are 2 blue lines for each input, one of which is the complement (the not) of the input. While these lanes are active high, their only way of output is effectively through a not gate, meaning they output as active low. All output lanes (the red lanes) except one have power to them, and since we're using active low, only one lane is high (despite being "off"). To fix this, we invert the outputs so that we get back to active high. Note that without the output inverter, you basically get nand behaviour. This is beneficial because if you want to power something like a seven segment display, you need an encoder. Encoders require active low inputs, and will produce an active high output, and since the output lanes are already active low, it's as simple as stacking the output lanes of the encoder beneath the output lanes of the decoder.

• An FPGA for a simple 2-bit decoder? That's overkill. Nov 18 '13 at 19:22
• This isn't exactly "field programable", just a gate array, with hard coded lookup table. Nov 18 '13 at 21:45
• @TokenMacGuy: You're missing the analogy, and the fact that it can be easily reprogrammed. If you start thinking in real-world constructs you can often find novel solutions to problems in minecraft. Besides, the field programmable thing is a bit of a misnomer to begin with. Someone still needs to write the VHDL and have a programmer with them to change what an FPGA does. Nov 18 '13 at 23:13
• @BlueRaja-DannyPflughoeft: It's also allows easy expansion both in terms of number of inputs and functionality. Sometimes flexibility trumps other concerns. Nov 18 '13 at 23:15
• @TokenMacGuy if you could push redstone torches around with pistons, then programming wouldn't be to hard (although the programmer would be many times larger than the FPGA). Maybe with some SethBling command block magic. Nov 19 '13 at 1:41

Redstone torches in Minecraft emulate NOR-gates, not NAND-gates. If you redesign the circuit with NOR gates, it will be much easier.

This circuit will require only 6 torches, one for each gate.

• Except it doesn't require only six torches unless you use some interesting tricks to isolate the inputs. Additionally, this is harder to construct (especially compactly) due to the crossing lanes. Nov 18 '13 at 22:17
• @MBraedley: Er, yes it does. A torch can have multiple inputs. Nov 18 '13 at 23:18
• Yes, it is possible to do it with 6 torches (just tested), but it's ugly and inelegant, and would require an incredible amount of work if you wanted to expand even just to 3 inputs. More importantly, you're not understanding what I mean by isolated inputs. Naive approaches can lead to, for instance, input A leaking onto input B. Not good, as it'll destroy the logic. Nov 18 '13 at 23:54
• yes i made it that way and as @MBraedley said it is ugly and some the torches doesn't change their stated even after changing the input signal this is what i am having problem with Nov 19 '13 at 1:30

You have to use repeaters from less than 15 blocks away if it does not work. You may be not using the redstone correctly. If it's a glitch, I suggest you to restart your computer. A virus may be in your game. Though you can't use too many redstone torches or it might not work. Use it below surfaces when you connect 2 upper blocks. Plans detailed pistons:
Pistons are not working anymore if your on a server. Only you can use plugins for this problem. Only 3 torches = 1 block. Multiply it by 2. That equals about 12. Use 12 torches for a full recommended working system.

A sticky piston might work, but if your using a non stoppable system, then use pistons. Use about 10 repeaters to make your robotics unstoppable. You may need to block the gates and go above them. If that doesn't work, then I don't know what to say... Sorry if this does not help you. But I will give you more information if you need it right now. Heres the unique redstone system.