What happens to a 32-bit input when a gate will only output 1 bit?
For the logic that you descibed you need a 32 input OR gate followed by an inverter. You do not want the XOR that you show in your diagram. 

If you cannot get an OR gate with 32 inputs then work with some smaller sizes. For example, if all you can get are 4-input OR gates then it will take 8 of these gates to accept the 32 total inputs. Next use a second bank of two more of the 4-input gates to pickup the 8 outputs of the first stage. Finally use a 3rd stage of one final gate to accept the two outputs of the 2nd stage. The two remaining inputs of that 3rd stage gate can be tied to GND. The output of that 3rd stage gate connects to your inverter to produce the final output.