Sum vs XOR

  • + 0 comments

    I understand 2 ** (number of zero) because each 0 has two posibilities- either 0 or 1. But, can someone help understand why it covers the case

    num ^ 0 = num + 0?

    Thanks a lot