function new = caiter(old)
code = [old(end), old(1:(end-1))] + 2.*old + 4.*[old(2:end), old(1)];
new = code==1 | code==4;
