The Goldfish Online has some really interesting LEGO logic gates – “…designed working NOT, OR, NOR, AND, and NAND gates. Using two NAND gates I have produced a NAND gate latch or Flip-FLop. The natural follow on from these is clocked logic, full-adders and ultimately a genuine “computer” device. At the moment all these gates essentially just demonstrators. They work, but because of the limitations that arise through gear slippage, the real practicable use is probably not that great.” The details of logic gates can be found here – Link.