The invention relates to a comparator circuit in which a reference potential is built in or imbedded. The comparator is primarily intended for use in switching voltage regulators but can be used in any application where a differential input terminal pair is required and an input reference is used in a voltage comparison function. In a switching regulator a number of terminals must be dedicated to circuit functions. For example, there must be supply and ground terminals along with a timing capacitor terminal. The control (or output) element requires emitter, collector and current limit terminals. Thus, six terminals are accounted for. If the comparator function is provided with inverting and noninverting inputs, eight terminals are required. If the device is to be housed in an eight-pin IC package there can be no provision for a separate reference potential terminal. It is highly desirable to make a switching regulator a universal device that can operate in the boost, buck and flyback modes and to house it in the most economical package available. This is the well known eight pin molded DIP. Since the flyback mode produces an inverted polarity output, the comparator must be capable of accepting inverted as well as standard inputs. This means that no reference pin is available. In some commercial regulators the comparator has only one input pin available. For these devices to be operated in the flyback mode another IC in the form of a unity gain inverter must be added to and coupled into the circuit.