1. A method for implementing an n-valued logic function with n>2, comprising: using a n-valued switch having an input and an output and a control input, wherein: the input is enabled to receive a signal having one of n states; the input is connected to the output whenever the control input is in a first of n-states; and the input is isolated from the output whenever the control input is not in a first of n states; and using an n-valued inverter.