https://www.lijinma.com/blog/2014/05/29/amazing-xor/