function [b, r] = tausworthe(r,p)
sz = size(p,2);
index = p(2:sz)+1;
n = xor_reduce(r(index));
b = r(1);
r = [r(2:size(r,2)) n];