The LittleBigPlanet community created physical logic gates so that they could create more advanced contraptions in their levels. In that game you had to do this for even simple AND logic, which is something the new Portal 2 editor does automatically. Just for fun, I played around a bit with the components in the editor, and made OR and XOR logic.
The OR Gate works by activating two glass panels in the way of a laser. If they're both down, the sensor is activated. If either or both of the panels is activated, the laser is cut off from the sensor. Reversing this output yields an OR operation on the input. I then built an XOR gate using two of these OR gates, and two NOT gates to convert their output for an implicit AND operation when the two floor sensors (see the third screenshot) are connected to the target.
I took these components and put together a 2-bit adder which fills a room. It's also a bit of a performance hog, I'm guessing because it uses 14 lasers.
Since these screenshots I've revised the level with logic based on designs by echeese
Logic diagram for 2-bit addition:
This was just for fun, but OR and NOT logic could be useful in a standard level.
For instance, if you want be able to open a path between two rooms from either room, you can use the OR gate to connect two buttons to a glass panel.
And if you want a object to activate when one switch is on but another is off, you can use a NOT gate.