The most complicated logic-gate to build in Minecraft is the XOR-gate. (Well, actually it is the XNOR but it is just a XOR with a NOT at the end.)
On a XOR-gate any of the inputs (usually two) can be high but only one at a time. So far I haven't seen good XOR-gates with more than 2 inputs, you can do a 4-input one by connecting two XOR-gates to a third one, but it gets quite large.
But today I thought that maybe you do it in a better way by using the goldilocks-gate I came up with. And I guess most of you who are reading this are thinking "What? How?"
Let me explain. The goldilocks-gate only lets a signal through if it is 15 blocks away from the source, too far away and the signal is to weak, too close and the signal is too strong.
But if the signal is just right it will reach the lower repeater, which will in turn let the upper torch on, while the power isn't too strong and won't reach the upper repeater that would quench the torch. (Please notice the 2-tick delay on the upper repeater, otherwise it wil get out of sync with the lower part and the upper torch will give a short pulse when the signal is too strong.)
Ok, that maybe didn't make things clearer and I guess you are still thinking: "What? How?" Well, this is the tricky part.
Here is an example, the power would need too travel 2 blocks longer on the wood blocks what it would have to do on the dirt since there is a lapiz block blocking the shortest path. And now some of you are thinking "Oooh, yeah, that is clever." but for the rest of you, here is what I made.
I simply placed 4 of these in a row, put power in one end and placed a goldilocks-gate on the other end in such a way that as long as exactly one of the holes was cut off, by a piston, the sum of the path would be 15 blocks, just right for Goldilocks. :)
This looks a bit confusing but I'm using a feature of glowstone, power can not run down the edge of them. (Up is ok, just not down.) I did this to be able to squeeze in 4 inputs before I would run out of power.
Anyway, better show this step by step.
First build one of these.
And then add a sticky-piston that will push a block to make the path longer. You do not need to build it this way, the piston can just as well block the path from above, whatever fits you build best.
Copy it four times.
Break the first two blocks and power it like this. It looks a bit weird but I found it to be the easiest way to do it.
Add the goldilocks-gate on the other side.
Add some inputs, an output and you are done. :)
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.