Redstone circuits/Logic/XOR

An XOR gate is a device which activates when the inputs are not the same, when only one is on. XOR is pronounced "zor" or "exor," a shortening of "exclusive or," because each input is mutually exclusive with the output. The output will be on only when exactly 1 of the inputs is on. Adding or removing a NOT gate to the end will produce an XNOR gate, which activates when the inputs are equal to each other. A useful attribute is that an XOR or XNOR gate will always change its output when one of its inputs changes, allowing for 2 switches to be combined to open or close a door, or activate another device. Like AND and OR gates, XOR gates can freely be "ganged" together, with gates gathering groups of inputs and their outputs being gathered in turn. Of the following patterns, F is the most widely used.

Design D is not very useful unless you want the levers to be fixed to the circuit. The shaded block indicates the block the levers are attached to, along with the block that one is resting on.

Design F is the most widely used. Note that a solid block must be placed over each of the two shaded redstone torches, the ones closest to the inputs.

Design I can have its input repeaters coming in from either side or underneath (it depends on block powering), changing its size accordingly to fit tight spaces.