This question already has an answer here:
I'm working on my first redstone structure, so it's extremely simple. It's a secret entrance to my base, and it's just two horizontal stickypistons, one of top of the other, that extend one piece of dirt each when the button is pushed. What I'd like to have it do is the opposite though, to retract a piece of dirt each when a button is pushed. Is there a way to do that?