Question

Let x1⊕x2⊕x3⊕x4=0x_1 \oplus x_2 \oplus x_3 \oplus x_4 = 0 where x1,x2,x3,x4x_1, x_2, x_3, x_4 are Boolean variables, and ⊕\oplus is the XOR operator. Which one of the following must always be TRUE?

Choose one option
Official answer and solution
Official answer
C
From
Official GATE 2016 answer key

Solution

Use the algebraic properties of the XOR operator to rearrange the given equation.

We are given:

x1⊕x2⊕x3⊕x4=0x_1 \oplus x_2 \oplus x_3 \oplus x_4 = 0

Since XOR is commutative and associative, and a⊕b=0  ⟺  a=ba \oplus b = 0 \iff a = b, we can group the variables:

(x1⊕x3)⊕(x2⊕x4)=0  ⟹  x1⊕x3=x2⊕x4(x_1 \oplus x_3) \oplus (x_2 \oplus x_4) = 0 \implies x_1 \oplus x_3 = x_2 \oplus x_4

Recall that the complement of a Boolean variable can be written as x‾=x⊕1\overline{x} = x \oplus 1. Thus:

x‾1⊕x‾3=(x1⊕1)⊕(x3⊕1)=x1⊕x3⊕(1⊕1)=x1⊕x3\overline{x}_1 \oplus \overline{x}_3 = (x_1 \oplus 1) \oplus (x_3 \oplus 1) = x_1 \oplus x_3 \oplus (1 \oplus 1) = x_1 \oplus x_3

Similarly:

x‾2⊕x‾4=(x2⊕1)⊕(x4⊕1)=x2⊕x4⊕(1⊕1)=x2⊕x4\overline{x}_2 \oplus \overline{x}_4 = (x_2 \oplus 1) \oplus (x_4 \oplus 1) = x_2 \oplus x_4 \oplus (1 \oplus 1) = x_2 \oplus x_4

Since x1⊕x3=x2⊕x4x_1 \oplus x_3 = x_2 \oplus x_4, it follows immediately that:

x‾1⊕x‾3=x‾2⊕x‾4\overline{x}_1 \oplus \overline{x}_3 = \overline{x}_2 \oplus \overline{x}_4

This equality holds under all assignments satisfying the premise.

Evaluate the other options with a counterexample:
Let x1=x2=x3=x4=1x_1 = x_2 = x_3 = x_4 = 1. Then 1⊕1⊕1⊕1=01 \oplus 1 \oplus 1 \oplus 1 = 0, but:

  • (A) x1x2x3x4=1≠0x_1 x_2 x_3 x_4 = 1 \ne 0
  • (B) x1x3+x2=1+1=1≠0x_1 x_3 + x_2 = 1 + 1 = 1 \ne 0
  • (D) x1+x2+x3+x4=1≠0x_1 + x_2 + x_3 + x_4 = 1 \ne 0
    All three fail.

Therefore, option (C) must always be true.

Final answer

C

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2016 Computer Science and Information Technology (CS) Session 2
Question
18 of 65, printed as CS Q.8
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.