Hi,
in your case input_1 is continously HIGH, making a NOT gate.. it just inverts the logic state of input_2.
****
instead of using 128 mechanical switches (I don´t like) you could just measure the coil current.
A diode and a resistor in one of the power lines of the solenoid... generates about 0.6...1.0V when solenoid is properly powered, but 0V when not powered (or contact problem, or broken wire).
128 is a huge count, therefore I´d check them serially instead of parallel.
--> a diode and a resistor at each of the 128 solenoids. 8 pieces of 1:16 analog MUX, a 1 of 8 digital demux (like HC138) and a comparator with 300mV threshold.
Klaus
Klaus