One common kind of decoupling is of a powered circuit from signals in the power supply. Sometimes, for various reasons, a power supply supplies an AC signal superimposed on the DC power line. Such a signal is often undesirable in the powered circuit. A decoupling capacitor can prevent the powered circuit from seeing that signal, thus decoupling it from that aspect of the power supply circuit.
Is this whats happening? If yes, then why use a capacitor instead of a diode? (I realize the diode would short the circuit if connected in the same way as the cap, but why not just place a diode somewhere in the circuit instead of that capacitor?)
but why is it not shorting the circuit in this case?
but why is it not shorting the circuit in this case? Vcc ------||-----Ground