What happens when a bit-string is XORed with itself n-times as shown: [ B⊕ (B⊕…
1998
What happens when a bit-string is XORed with itself n-times as shown: [ B⊕ (B⊕ (B⊕ (B........ n times) ]
Answer: D. remains unchanged when n is even — XOR is associative, and the two key identities are: B XOR B = 0, and X XOR 0 = X. Here the intended meaning is that the bit-string B is XORed with itself…
- A.
complements when n is even
- B.
complements when n is odd
- C.
divides by 2^n always
- D.
remains unchanged when n is even
Attempted by 118 students.
Show answer & explanation
Correct answer: D
XOR is associative, and the two key identities are: B XOR B = 0, and X XOR 0 = X.
Here the intended meaning is that the bit-string B is XORed with itself repeatedly n times. The result alternates after each XOR operation:
After 1 operation: B XOR B = 0.
After 2 operations: (B XOR B) XOR B = 0 XOR B = B.
After 3 operations: B XOR B = 0 again, and so on.
Thus, after an even number of XOR-with-B operations, the final result is the original bit-string B. So the bit-string remains unchanged when n is even.
XORing a bit-string with itself does not produce the complement, and it is not arithmetic division. Therefore, the correct option is: remains unchanged when n is even.
Explore the full course: Iocl Engineers Officers Grade A Paper 2