Bit Manipulation — XOR

Zula
Apr 1, 2022

--

How do I get zero for two same parameters?
example: x ^ x = 0;

Truth table of XOR

How do I get new different value for xor of two parameters?
example:
2 ^ 3 = 1; 2 ^ 5 = 7; 2 ^ 10 = 8;

Answer:

The XOR is done based on the truth table

--

--

Zula
Zula

Written by Zula

Software Engineer @Ericsson, former Google, MorganStanley, Nokia, Founded @gdsc.elte

No responses yet