Either you're generating two rising pulses, or you need to debounce the pushbutton... I'm not familiar with the sim software that you're usingThank you, its working.. Kind of... The signal of counter is too long comparing with push button.. When push button comes back to its original possition in this case open, signal of counter is still active and XOR creates double signal.. Instead of 9 (when counting down from 10) im getting 8.