15 Dec 11, 01:01PM
![[Image: 2011_12_15_22_49_00_Copy.png]](http://s5.postimage.org/6sn9qd3oj/2011_12_15_22_49_00_Copy.png)
![[Image: 2011_12_15_22_50_05_Copy.png]](http://s5.postimage.org/88ys8i6lf/2011_12_15_22_50_05_Copy.png)
You input your input with the levers in the bottom left, and the press the button on the most bottom-left block. The input then runs through an "and" gate, an "or" gate and an "xor" gate. If a certain gate returns true and the button's signal is also present, the piston system (with the stacks of sand and gravel) pushes a block of sand into the hole in the middle in the relevant spot for that gate.
The left-side pile of blocks inside the hole (second pic) is the output of the xor gate, the centre is the or gate and the right-side is for the and gate.
As an example, the picture above is the result of inputting (with the button pressed between each input) 1-0, 0-0, 1-0, 1-1, 0-0, 1-1.
In conclusion, I built a machine that does a lot of stuff to drop some sand in a hole :P