Theory of CMOS Digital Circuits and Circuit Failures