Videos
Based on your description, you are looking for either a NAND gate, a XOR gate, or an IMPLIES gate. Which one you choose will depend on how you want the logic gate to behave when the main (A) circuit is off.
NAND gate:
- A is on and B is on = off
- A is on and B is off = on
- A is off and B is on = on
- A is off and B is off = on
XOR gate:
- A is on and B is on = off
- A is on and B is off = on
- A is off and B is on = on
- A is off and B is off = off
A IMPLIES B (inverted output)
One last possibility for completeness sake is the A implies B circuit, although for the purposes of your desired output I'm inverting the output.
- A is on and B is on = off
- A is on and B is off = on
- A is off and B is on = off
- A is off and B is off = off
While I'm not too happy with the XOR gate demonstrated (it seems to be comparatively large and clunky), the Minecraft Wiki article does demonstrate a few variants for each logic gate.
I believe to have a much simpler solution to the problem. Have input A go directly to the output except for one piece of wire. You should dig out 1x1 block out of the ground and place the redstone in that hole. You currently input should = output, i.e input on = output on. Now 2 blocks to the side of the 1x1 hole place a sticky piston facing the hole and any full block in front. This does not include half blocks, glass or stairs. Now have input B power the piston. This cuts off the power from input A. Now...
if B=off, O=A if B=on, O=off
O is the output