I'm trying to build a synchronous demodulator, where I'm looking for frequency components in an audio signal that are either in phase or out of phase with an externally-generated 50% duty-cycle clock. One approach is to use a circuit that has a switchable gain of either +1 or -1. The gain control signal will come from a logic level 50% duty-cycle clock . Circuit should have small offset between +1 and -1 gain. Supply voltage is single ended 9V.