Logical Operator ^ (XOR) | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

Logical Operator ^ (XOR)

Can anyone make me understand the logical Operator code logic. like how it is working ? i know when one is false between two then it gives true and when both are true it gives false and both are false it gives also false. Here is my attempt 👇 https://code.sololearn.com/c1HsQYdWD0RY/?ref=app

2nd Sep 2022, 5:53 AM
Davinder Kumar
Davinder Kumar - avatar
1 Réponse
+ 5
0 XOR 1 write to bin both numbers and in each col apply xor 0 1 ==== 1 1 XOR 10( 2 ) 01 10 === 11 = 3 11 XOR 100(4) 011 100 ==== 111 111 XOR 001(1) 111 001 ==== 110 110 XOR 010(2) 110 010 ==== 100=4
2nd Sep 2022, 7:03 AM
Oma Falk
Oma Falk - avatar