1. A method of generating logic functions of 2-input signals by programming switches, the method comprising: connecting a first input, a voltage Vdd, or their inverses to a first pass gate through a plurality of programmable switches; connecting the first input, the voltage Vdd, or their inverses to a second pass gate through a plurality of programmable switches; and controllably connecting the first and the second pass gates to an output, wherein the first and the second pass gates are controlled by a second input signal.