function [b] = xor_reduce(a)
sz = size(a,2);
b = a(1);
for i = 2:sz
    b = bitxor(b, a(i));
end