Input protection to an integrated circuit, either a gate, a microprocessor, or opamp is often overlooked. Even though the datasheets say the device provides input protection, it is always good design practices to add extra protection. Over voltage or static discharges can and will damage an input pin and render the device useless. It is far better and cheaper to add a couple diodes rather than replace a defective I.C.
Figure 29 shows how to protect the input of this gate from the outside world. D1 and D2 keep the gate input from exceeding Vcc+.7 volts and going negative ground-.7 volts. R1 limits the amount of current that can be strapped by input diodes. R2 is optional depending upon what the input source is providing. It keeps the input from floating if left unconnected. This is very important especially with CMOS logic. This type of input protection can be used with almost any family of logic including processors.
Power supply protection is important because providing reverse or over voltage can and will damage logic devices or voltage regulators. For a circuit requiring 5 volts, if it is hard wired to the power supply regulator, little protection is required. If the circuit or circuit board is removable, it is proper design to place a regulator on the circuit board and feed it with unregulated power. This isolates the 5 volt logic from the outside world. In automotive applications, more protection is required. Voltages on the 12 volt battery buss can exceed 17 volts and spikes can exceed a few hundred volts. Voltage dips can lock up or cause erratic operation of a circuit too.