+ 1
Can any body tell me what this "^" does in a program.For example 60 ^ 40 gives me 20 when I run it
I need an answer
2 Antworten
+ 5
MK MICHAEL
it is called xor and it works with the bits of the number
60 in binary 111100
40 in binary 101000
-------------
010100 20
it will output 1 if the two bits are different
+ 1
Look for bitwise exclusive OR here
https://www.sololearn.com/learn/4070/?ref=app