1. A nanoscale logic gate comprising: an alternating-current source; two or more input signal lines connected through resistive elements to the alternating-current source and carrying direct-current logical states; a signal line connected to the alternating-current source and two or more input signal lines through a switch element that is either in a high-impedance state or a low-impedance state; and an output signal line that outputs an AC logical state.