Analog Devices Interview Question

State diagram, cmos logic gates