1.6k views

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

edited | 1.6k views
0
in this question bit string is xored n times wht does it mean ?

@bikram sir
0

@set2018

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.

0
Can anyone please explain me what does the question mean?

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

edited by
+2

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 ?

+14

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 ".

0
yes no option matches
+9

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

That is the standard rt?

0
ok,tnk u
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
0
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...

correct me if i am wrong

0
nice explanation
0
@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
@lakshay

you can do it as you have intreprated

exor opration done n times

if n is even number of B's is odd hence it will be complemented

1
2