The bitwise xor (exclusive or) operator has the following truth table:

$$
\begin{array}{c|cc}
\text{^}&0&1\\
\hline
0&0&1\\
1&1&0
\end{array}
$$

It is true that if $a,b,c,d$ are boolean variables, then $a\text{^}b\text{^}c\text{^}d$ is unambiguous.

I proved this using the following truth charts and induction:

> 
> ((0^0)^0)^0=0
> 
> 
> 

> 
> ((1^0)^0)^0=1, ((0^1)^0)^0=1, ((0^0)^1)^0=1, ((0^0)^0)^1=1
> 
> 
> 

> 
> ((1^1)^0)^0=0, ((1^0)^1)^0=0, ((1^0)^0)^1=0, ((0^1)^1)^0=0, ((0^1)^0)^1=0, ((0^0)^1)^1=0
> 
> 
> 

> 
> ((1^1)^1)^0=1, ((1^1)^0)^1=1, ((1^0)^1)^1=1, ((0^1)^1)^1=1
> 
> 
> 

> 
> ((1^1)^1)^1=0
> 
> 
> 

---

> 
> (0^0)^(0^0)=0
> 
> 
> 

> 
> (1^0)^(0^0)=1, (0^1)^(0^0)=1, (0^0)^(1^0)=1, (0^0)^(0^1)=1
> 
> 
> 

> 
> (1^1)^(0^0)=0, (1^0)^(1^0)=0, (1^0)^(0^1)=0, (0^1)^(1^0)=0, (0^1)^(0^1)=0, (0^0)^(1^1)=0
> 
> 
> 

> 
> (1^1)^(1^0)=1, (1^1)^(0^1)=1, (1^0)^(1^1)=1, (0^1)^(1^1)=1
> 
> 
> 

> 
> (1^1)^(1^1)=0
> 
> 
> 

I feel there must be a better solution though.