# Is it possible to build simple logic gates with LEGO mechanics?

I built a simple bitshifter in Minecraft yesterday. I wondered if something like this could be built with LEGO?

Maybe there is a possibility to build gates with rubber bands and those movable mechanic stuff. Did anyone of you do something like this?

Various people have done this - however most of the links seem to point to a [then defunct] blog by Martin Howard (Randomwraith) from 2004.

A more recent, and available, post on this, using newer pieces can be seen here:

Based on a lack of gears and rack and pinion elements, Keshav decided to rebuild the logic gates using an approach based around levers. Extra care was taken to ensure that the movements were uniform so that the outputs moved the same distance as the inputs.

Starting with the simplest gate, a NOT Gate was built:

Then going back to first principles, a NOR Gate:

Combining a NOR with two NOTs gives an AND Gate:

Finally Keshav built the XOR Gate out of 3 NORs and 2 NOTs (or 2 NORs and an AND):

All images used with permission

• Thats a great link.. maybe someone could build a computer ;) Commented Oct 25, 2011 at 21:43
• I think those gates work only in small scale, because of the friction. Commented Oct 28, 2011 at 19:33
• Thanks for the link to my blog! By the way, you have my permission to use my images. I'm not really into the whole copyright thing so feel free to use them. Credit would be nice :) Commented Mar 11, 2012 at 1:35
• Thanks for the link! Unfortunately my site has been up and down like a yo-yo lately, which is very frustrating. I don't know if the decoupling that I referred to is present in all gates, but it does appear to be in the NOR gate, shown above. In that case the inputs don't seem to be attached to the central levers, which would mean the output when going from say an 1,1 input to a 0,0 input wouldn't change :-( It looks like this blogger has attempted to solve the problem though: spillerrec.wordpress.com/2012/01/29/mechanic-nor-gate RW
– user866
Commented May 29, 2012 at 21:57
• I'll offer a bounty of 100 to anyone who creates an SR latch and explains why Q or ~Q is set when the inputs are 0 and 0. Commented Jun 21, 2017 at 14:45

There's this project, and with a mechanism like that you have a pretty high limit on the complexity of what you can do: