ClearAll["Global`*"]
SeedRandom@2;
n = 2; i = 4; j = 4;
list0 = Flatten@{ConstantArray[0, j - n], ConstantArray[1, n]};
list = DeleteDuplicates@
RandomChoice[Permutations[list0, {j}], {100000, i}];
s = {};
Table[If[SameQ @@ {Total@list[[i]], Total@Transpose@list[[i]]},
AppendTo[s, list[[i]]], Nothing], {i, Length@list}];
Labeled[Framed@
Multicolumn[
ArrayPlot[#, Mesh -> True, ImageSize -> 50, Frame -> True,
FrameStyle -> Red
] & /@ s, 15],
Framed["Toplam Permustasyon=" <> ToString@Length@s], Top]