+ 1
Compiler error (specific or non-specific)
#🤣check calculator ee=0^0 print (str(ee)) Why does the compiler give 0 as the answer ?
4 Respuestas
+ 5
This is the truth table for XOR operation:
a ^ b = c
-------------------
0 ^ 0 = 0
0 ^ 1 = 1
1 ^ 0 = 1
1 ^ 1 = 0
So the answer is not wrong.
+ 3
Because the xor of 0^0 equals 0.
xor is a bitwise operator that only returns 1 for the bit if 1 of the bits, but not both, is 1.
0 in bits equals 00000000 (1 byte)
So
00000000
00000000
‐-----------------
00000000
XOR TABLE
A | B | XOR
0 | 0 | 0
0 | 1 | 1
1 | 0 | 1
1 | 1 | 0
+ 3
^ is xor operator: https://www.sololearn.com/learn/4074/?ref=app
+ 1
you've at least posted two questions related to this xor operator in few days, where you already get answers:
https://www.sololearn.com/Discuss/2734360/?ref=app
https://www.sololearn.com/Discuss/2729051/?ref=app