42 votes 42 votes What happens when a bit-string is XORed with itself $n$-times as shown: $\left[B \oplus (B \oplus ( B \oplus (B \dots n \text{ times}\right]$ complements when $n$ is even complements when $n$ is odd divides by $2^n$ always remains unchanged when $n$ is even Digital Logic gate1998 digital-logic normal boolean-algebra + – Kathleen asked Sep 25, 2014 • edited Jun 17, 2018 by kenzou Kathleen 10.1k views answer comment Share Follow See all 7 Comments See all 7 7 Comments reply Show 4 previous comments Nirmalbbll commented Oct 2, 2020 reply Follow Share key point here xor operation is performed n times, so number B will be n+1 B⊕B⊕B= B (Number of XOR operation is 2 ,i.e., Even) B⊕B⊕B⊕B= 0 (Number of XOR operation is 3 ,i.e., Odd) B⊕B⊕B⊕B⊕B =B (Number of XOR operation is 4 ,i.e., Even) B⊕B⊕B⊕B⊕B⊕B= 0 (Number of XOR operation is 5 ,i.e., Odd) Source:geeksforgeeks 3 votes 3 votes Deepak Poonia commented Oct 15, 2021 i edited by Deepak Poonia Jul 16, 2022 reply Follow Share $\color{red}{\text{Find Detailed Video Solution Below}}$ $\color{BLACK}{\text{ , With Complete Analysis:}}$https://youtu.be/cPUpu3X8Upw 10 votes 10 votes GauravRajpurohit commented Oct 22, 2023 reply Follow Share @varunraj Option B is saying that if we perform XOR operation an odd number of times then we get B’ (complement of B) in this case. B ⊕ B = 0 { here we are doing XOR 1 time) similarly, if you are doing any odd number of times then you will get B’ which is incorrect because if we perform an odd number of times ⊕ operation then you will get always 0 as output because the number of the same variable will be even. 1 votes 1 votes Please log in or register to add a comment.
Best answer 47 votes 47 votes It should be (D). Let number of $⊕$ be two (even case): $B ⊕ B ⊕ B = B ⊕ 0 = B$ (remains unchanged) Let number of $⊕$ be three (odd case): $B ⊕ B ⊕ B ⊕ B = B ⊕ B ⊕ 0 = B ⊕ B = 0 ($gives $0)$ Rajarshi Sarkar answered Jun 6, 2015 • edited Jun 17, 2018 by kenzou Rajarshi Sarkar comment Share Follow See all 7 Comments See all 7 7 Comments reply Show 4 previous comments srestha commented Nov 1, 2016 reply Follow Share ok,tnk u 0 votes 0 votes rishabhsharma commented Oct 10, 2020 reply Follow Share When number of boolean variables is Even(i.e. number of XORed is odd) then output is complement. When number of boolean variables is Odd(i.e. number of XORed is even) then output is Unchanged or Same. 0 votes 0 votes Overflow04 commented Sep 18, 2022 i edited by JAINchiNMay Nov 6, 2022 reply Follow Share @pCremains unchanged when $n$ is even meansB⊕B = B ⊕ B ⊕ B ⊕ B = B ⊕ B ⊕ B ⊕ B ⊕ B⊕B = 0 i.e. result of even number will always be same. 0 votes 0 votes Please log in or register to add a comment.
8 votes 8 votes correct me if i am wrong Gurdeep Saini answered Oct 24, 2018 Gurdeep Saini comment Share Follow See all 3 Comments See all 3 3 Comments reply Shubham Aggarwal commented Oct 25, 2018 reply Follow Share nice explanation 1 votes 1 votes lakshaysaini2013 commented Oct 26, 2018 reply Follow Share @shubham can we also interpret the answer as when we have ⊕ as odd then we have even B and xor is mod 2 which give 0. and when we have ⊕ as even then we have odd B which will return B only. 0 votes 0 votes Gurdeep Saini commented Oct 26, 2018 reply Follow Share @lakshay you can do it as you have intreprated 0 votes 0 votes Please log in or register to add a comment.
4 votes 4 votes Here " when a bit-string is XORed with itself n-times " means XORed n times not bit string n times so ans should be D Anil Khatri answered Oct 20, 2016 Anil Khatri comment Share Follow See 1 comment See all 1 1 comment reply utpal podder commented Jul 24, 2018 i edited by utpal podder Jul 24, 2018 reply Follow Share Let n is even Let B=101 since its given that B is a bit string..... Let n=2 means we have to exored B itself 2 times..so B exor (B exor B) = 101 exor (101 exor 101) =101 exor 000 = 101 So we see when n=2 the result is same as that of the taken bit string...similarly we can check the remaiming options for any string we get the option d is correct... 1 votes 1 votes Please log in or register to add a comment.
3 votes 3 votes The main important thing to be considered is the xor operation is done n times not the b is repeated n times svas7246 answered Jul 16, 2022 svas7246 comment Share Follow See all 4 Comments See all 4 4 Comments reply Abhrajyoti00 commented Jul 16, 2022 reply Follow Share Yes as the bit string is $’XOR-ed’$ n-times. 1 votes 1 votes svas7246 commented Jul 16, 2022 reply Follow Share That is the major area where this question can go wrong 1 votes 1 votes Abhrajyoti00 commented Jul 16, 2022 reply Follow Share Exactly. Love the question framings by IIT professors! 1 votes 1 votes mohit7891 commented Nov 6, 2023 reply Follow Share yes, that’s the fun part. 0 votes 0 votes Please log in or register to add a comment.