ISRO-2017 December
January 2, 2024Group-Theory
January 3, 2024UGC NET CS 2005 Dec-Paper-2
|
Question 8
|
Consider the following sequence of instructions :
a=a⊕b, b=a⊕b, a=b⊕a
This Sequence
a=a⊕b, b=a⊕b, a=b⊕a
This Sequence
|
retains the value of the a and b
|
|
|
complements the value of a and b
|
|
|
swap a and b
|
|
|
negates values of a and b
|
Question 8 Explanation:
⇒ a=a⊕b
⇒ b=a ⊕b
= a⊕b ⊕b (Substitute (1))
= 0 ⊕ b
= b
⇒ a = b⊕a
= b⊕a⊕b (Substitute (1))
= a⊕b⊕b
= a⊕0
= a
⇒ b=a ⊕b
= a⊕b ⊕b (Substitute (1))
= 0 ⊕ b
= b
⇒ a = b⊕a
= b⊕a⊕b (Substitute (1))
= a⊕b⊕b
= a⊕0
= a
Correct Answer: A
Question 8 Explanation:
⇒ a=a⊕b
⇒ b=a ⊕b
= a⊕b ⊕b (Substitute (1))
= 0 ⊕ b
= b
⇒ a = b⊕a
= b⊕a⊕b (Substitute (1))
= a⊕b⊕b
= a⊕0
= a
⇒ b=a ⊕b
= a⊕b ⊕b (Substitute (1))
= 0 ⊕ b
= b
⇒ a = b⊕a
= b⊕a⊕b (Substitute (1))
= a⊕b⊕b
= a⊕0
= a
