Boolean AND gate made of LEGO pneumatics


This is my penumatic AND gate invention. It is a successor to my pneumatic OR gate invention. It is much simpler than the OR gate. This simplicity allows it to operate faster, more reliably and at lower pressures than the OR gate.

AND gates, OR gates and NOT gates are the basic computational mechanisms of boolean mathematics. It is also referred to as boolean logic. It is named for the mathemethician Boole who invented it. Boolean logic is the mathematics used to implement digital logic. Digital logic used to make the computer you are viewing this with, your TV remote and lots of other things in your house. 

Boolean gates have input(s) and outputs. An AND and OR gates have 2 or more inputs and one output. NOT gates have one input and one output.

Below is a truth table describing the function of an and gate. I really liked truth tables when I was first introduced because they make it so simple to describe all cases possible with Boolean operators. 

Inputs Output 

 0 0 0 

0 1 0 

1 0 0

 1 1 1 

In English, this table says that both inputs must be 1 for the output to be a 1, otherwise the output is a 0. 

My pneumatic AND gate is made of two pneumatic pistons hooked at the base, connected to a pneumatic valve. The mechanism is simple. Both pistons must be expanded to turn on the pneumatic valve, otherwise the valve is turned off.

For my pneumatic boolean environment, I consider an contracted piston to be 0 and an expanded piston to be 1. The four pictures below show each of the four possible input conditions to the gate outlined by the AND truth table. 

Another very useful Boolean operator (gate) is the NOT gate. It has one input and one output. Here is the truth table for NOT operator. 

Input Output 

0 1 

1 0 

In my pneumatic Boolean environment, you can implement the not operator, simply by reversing the pneumatic tubes that feed a piston. In doing so, the what used to expand the piston contracts it and visa versa. Another mathemetician, named DeMorgan realized that if you have an AND gate and NOT gates, you can make an OR gate. If you NOT the inputs to the gate, and NOT the output from the gate, you convert the AND to an OR. The same technique can be used to convert an OR to an AND gate. First the definition of an OR gate: 



 0 0 0

 0 1 1

 1 0 1

 1 1 1 

Now lets apply DeMorgens theorum to an AND gate: 



0 0 1 1 1 0 

0 1 1 0 0 1 

1 0 0 1 0 1 

1 1 0 0 0 1 

The NOT AND column has the same values as the OR gate truth table above. 

So to convert my AND gate to an or gate, I simply need to swap the connections on all three pistons in the circuit. 

One example use of pneumatic boolean logic is my PneumADDic adding subtracting machine. It was implemented using my first pneumatic gate the OR gate. By comparing the construction of my OR gate, and my AND gate, you can see that the AND gate is much simpler. I could easily reconstruct PneumADDic using and gates and DeMorgen's theorum. It would operate much faster because the AND gate needs less pressure to function than the OR gate. 

A more practical use for AND gates is to combine it with the classic two cylinder pneumatic control circuit created by Eric Brok . 

This control circuit uses two pistons that create a repeating pattern over time: closed-closed, open-closed, open-open, closed-open, closed-closed, etc.

Given that I consider a closed piston to be a 0 and an open piston to be a 1, the sequence maps out to four stages. 

Stage P0 P1 

0 0 0 

1 1 0 

2 1 1 

3 0 1 

After stage 3, the pistons go back to stage 0. Note that each piston is on half the time. What if you want something to happen only in stage 2? Looks like a perfect time to apply an AND gate. The results look like this: 

Stage P0 P1 AND 
0 0 0 0 

1 1 0 0 

2 1 1 1 

3 0 1 0 

If you want a piston to expand at each of the four stages, you could use AND gates and NOT connectivity to achieve this. To make it all fit on the page, I use the ~ symbol to mean NOT and the & symbol to mean AND. Stage P0 P1 ~P0 ~P1 (~P0 & ~P1) (P0 & ~P1) (P0 & P1) (~P0 & P1) 

0 0 0 1 1 1 0 0 0 

1 1 0 0 1 0 1 0 0

 2 1 1 0 0 0 0 1 0 

3 0 1 1 0 0 0 0 1 

This entire pneumatic circuit would take 10 pistons! You'd need a lot of pneumatics to implement it! Well I hope this helps you invent new and fascinating LEGO projects! s