The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+16 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

asked in Digital Logic by Veteran (59.5k points)
edited by | 1.3k 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

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

answered by Boss (34k 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
+2 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
answered 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
answer - A

exor opration done n times

if n is even number of B's is odd hence it will be complemented
answered by Loyal (9k points)

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

37,939 questions
45,453 answers
48,209 users