For folks that are interested in learning more about bitwise operations, here is another article (slightly more nuanced) about XORs that you may enjoy reading:
All About XOR: https://accu.org/journals/overload/20/109/lewin_1915/
All About XOR: https://accu.org/journals/overload/20/109/lewin_1915/