isOdd = logical(bitand(N,1)); isEven = ~logical(bitand(N,1));