matthewlynch.net Musings on programming, electronics, and other such things.

21Mar/110

4-bit Decoder in Minecraft

I have had a bit of an obsession with Boolean logic recently, and 'thanks' to the flu, I have had a lot of spare time over the last few days.

So I decided to combine the two, and build a 4-bit to 16-line decoder in Minecraft.

For those that don't know, Minecraft is a sandbox-style game in which players can build many different things out of blocks (kind of like Lego).

But what interested me is a mechanic called 'redstone dust'. Players can make torches out of this dust and add them to blocks to power them. They can then use the dust to connect the powered block to other special blocks - like doors, and traps - to give them power.

What is really interesting, though, is what happens when you connect two or more torches together.

Run power from Torch A in to Torch B, and Torch B will switch off. In other words it acts like a NOT gate. More interestingly, if you connect two or more torches to one torch, the targeted torch acts like a NOR gate.

This is great, because the NOR gate is a universal gate.

And so I was able to build this 4-bit decoder:

The first half of the video shows the device working. The second half shows the actual device in all its glory.

I based it off a design that I put together recently for a different project, but had to add a lot of repeaters (NOT-NOT) because Minecraft limits the length of a 'wire' to 15 squares.

2Sep/100

But what about inheritance of boxes??

Ah, yes, that language is good for domain-specific solutions but it doesn't adequately address the issue of multiple inheritance out of the box.