If I have to do XOR for $5$ times (a XOR b XOR c XOR d XOR e XOR f), how would that work? Is there some easy way to get the final formula or do I really have to do it by hand?
$\def\bnot#1{\overline{\phantom{\vert\!}{#1}}~\!}$I know that XOR for $3$ variables $a,b,c$ is $(a\bnot b\bnot c + \bnot{a}b\bnot c + \bnot a\bnot bc + abc)$, where $\bnot a$ is "NOT" $a$. Do I continue it from here?
Many thanks!
Xor is addition modulo 2 which is a group so it is associative. This means you can do two xor with 3 input arguments twice. If you have access to such a calculator. Or two by two or any other combination
$$x_1\oplus x_2 \oplus x_3 \oplus x_4\oplus x_5 \oplus x_6=\\(x_1\oplus x_2 \oplus x_3) \oplus (x_4\oplus x_5 \oplus x_6)=\\(x_1\oplus x_2) \oplus( x_3 \oplus x_4)\oplus (x_5 \oplus x_6)$$ So after one run of calculations with 2-input xors: $\cases{y_{12} = (x_1 \oplus x_2)\\y_{34} = (x_3 \oplus x_4)\\y_{56} = (x_5 \oplus x_6)}$
we only have $y_{12} \oplus y_{34} \oplus y_{56}$ left to calculate. So we have halved the number of variables in one go. This would not be possible if we only did sequential operations.