+ 1

X -OR operation in python.

Input 1=0011 Input 2= 1011 Output - 1110 As we know in X-or gate if any of the input is it will return 1 . X-or table 1 0 =1 0 1 = 1 1 1 = 0 0 0= 0 So my question is that as add 1 1 it will carry 1 to next operation I'm confused on that how can I implement that.?

11th Dec 2022, 7:56 AM
Akash Gupta
Akash Gupta - avatar
1 Respuesta
+ 3
1 1 => 3 1 1 => 3 1 _________ 11 0 => 6 Here 1 + 1 = 10 so carry 1 is added to next bit operation so it is added like 1+1+1(carry) = 11 edit: you can get carry by input1 & input2
11th Dec 2022, 8:39 AM
Jayakrishna 🇮🇳