This is a special case of my question How to do nor on matrices?
a = IdentityMatrix[3];
b = {{1, 0}, {0, 1}, {0, 0}}
MapThread[Complement[#1, #2] &, {a, b}]
Mathematica returns {{}, {}, {1}} , whereas I expect {{0}, {0}, {1}}, which is what I need.


{{}, {}, {1}}is what I would expect. Just replaceComplementwith e.g.cinMapThreadand observe what are the direct arguments toComplement. – István Zachar Feb 17 at 14:56Complement[ConstantArray[0, 10], {0}]a list of 9 zeros! SoComplementbased solution does not work for him as opposed to his previous question that you have noted as duplicate. – PlatoManiac Feb 17 at 15:04bitNor[{x_,y_}]:=Mod[BitNot[BitOr[x,y]],2]. – murray Feb 17 at 17:00