Logic gate diode