People typically give one explanation when asked what the function is of decoupling capacitors, but the truth is they fulfil several tasks.
Here is the list of things I am aware of:
They reduce ground bounce
Ground bounce is a phenomenon where a changing voltage difference across the ground plane negatively affects (mostly) analog and (sometimes) digital signals. For analog signals, like audio for example, this could manifest itself in the form of high pitched noise. For digital signals it could mean missing / delayed / fake signal transitions.
The changing voltage difference is caused by the creation and collapse of magnetic fields caused by changing current flows.
The longer the path the current flow has to follow, the higher the inductance associated with it and the worse the ground bounce becomes. Multiple current flow paths also exacerbate the problem, as well as the speed at which the current changes.
Current flow obviously occurs between a power supply and a connected IC, but somewhat less obviously also between "communicating" ICs. The current flow associated with two ICs looks like this; power supply -> IC 1 -> IC 2 -> Ground -> power supply.
A decoupling capacitor effectively decreases the length a current path by functioning as a power source, thereby decreasing inductance and thus ground bounce.
The previous example becomes; Cap -> IC 1 -> IC 2 -> Ground -> Cap
They keep voltage levels stable
There are two reasons why voltage levels fluctuate:
- Trace/wire inductance decreases the maximum rate of change of current through that trace/wire; a sudden increase in 'demand' for current will result in a drop in voltage; a sudden decrease in 'demand' for current will result in a spike in voltage.
- Power supplies (especially those of the switching type) need time to respond and will slightly lag behind current demand.
A decoupling capacitor will smooth current demand and reduce any drops or spikes in voltage.
They CAN reduce EMI (transmission)
When we talk about electromagnetic interference, we are either referring to the transmission of unintended electromagnetic interference or the receiving of intended or unintended electromagnetic signals that are interfering with the function of your device. Typically it refers to the transmission itself.
The placements of (decoupling) capacitors between power and ground planes changes the transmission coefficient across a range of frequencies. Apparently using only one value for your capacitors for the entire PCB as well as lossy / high resistance capacitors is the way to go if you need to reduce EMI, however this goes against common practice (which advocates an increasing order of capacitance the closer you are to the power supply). Most people don't really concern themselves with EMI if they make circuits for their hobby (though radio amateurs typically do), but it becomes unavoidable when you are designing a circuit for mass production.
A (decoupling) capacitor CAN reduce unintended electromagnetic radiation being produced by your circuit.
To answer your remaining questions..
How do I know if I need one and if so, what size and where it needs to
go?
Typically you place a decoupling capacitor whenever possible, choosing the smallest physical size with the largest value as close as possible to the power supply pin of the IC.
Would an SN74195N 4-bit parallel access shift register used with an
Arduino need one? (To use my current project as an example) Why or why
not?
It would probably work fine, but why bother with 'probably' if you can increase the odds by placing a component that costs a few cents, even a single cent in some cases?