I have three piston in a line and I want the middle one to turn off when the two side piston turn on and vise versa. Does any one know how I can do this?
I think what you want is something like this.
The only caveat is that you can't have a block right above the torch, or it will burn out. You want your input to go into the back of the stone brick block.
I'm not sure if there is a more efficient way to do this, but this will work.
This works because when you apply redstone to a redstone torch, the torch turns off, this inverting the redstone state.