The Gateway to Computer Science Excellence
+22 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]$

  1. complements when $n$ is even

  2. complements when $n$ is odd

  3. divides by $2^n$ always

  4. remains unchanged when $n$ is even

in Digital Logic by Veteran (52.3k points)
edited by | 2.5k views
in this question bit string is xored n times wht does it mean ?

@bikram sir


This means 

[B⊕(B⊕(B⊕(B⊕(B⊕(B … ⊕B ) ) ) ) )  ]

B xor B -- B is xored with itself one time.

B xor Bn -- B is xored with itself n number of times.

Can anyone please explain me what does the question mean?

3 Answers

+27 votes
Best answer

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)$

by Boss (33.9k points)
edited by

bit-string is XORed with itself n-times

Here 'n' represents number of times bit string (B) is used Not number of times $\bigoplus$ is used .

B$\bigoplus$B =0 $\Rightarrow$ n is even . No option matches

I understood question in this way . What did I do wrong ?


me too. but when no option matched i realized maybe they want to say something else.

My explanation : Question says " XORed with itself n-times "

B xor B -- B is xored with itself one time.

B xor B xor B --- B is xored two times.

PS: this question would have given -ve marks to many if there was a option " remains unchanged when n is odd ".

yes no option matches

B xor B -- B is xored with itself one time.

That is the standard rt?

ok,tnk u
+3 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
by Active (2.4k points)
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

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...
+2 votes

correct me if i am wrong

by Boss (10.6k points)
nice explanation
@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.

you can do it as you have intreprated
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,834 questions
57,777 answers
108,213 users