As ⊕ is **commutative **and **associative **operator, so we can remove all the parentheses if required, and apply the following three properties

1. x⊕x = 0

2. 0⊕x = x

3. 1⊕x= x'

Answer will be (D)

The Gateway to Computer Science Excellence

First time here? Checkout the FAQ!

x

+18 votes

Let $\oplus$ denote the exclusive OR (XOR) operation. Let '1' and '0' denote the binary constants. Consider the following Boolean expression for $F$ over two variables $P$ and $Q$:

$$F(P,Q)=\left( \left(1 \oplus P \right) \oplus \left( P \oplus Q \right )\right ) \oplus \left(\left(P \oplus Q\right) \oplus \left(Q \oplus 0\right)\right)$$

The equivalent expression for $F$ is

- $P+Q$
- $\overline{P+Q}$
- $P \oplus Q$
- $\overline {P \oplus Q}$

+27 votes

Best answer

XOR is associative and commutative. Also, $A \oplus A = 0$ and $A \oplus 1 = \overline{ A}$ and $A \oplus 0 = A$. So

$\left( \left(1 \oplus P \right) \oplus \left( P \oplus Q \right )\right ) \oplus \left(\left(P \oplus Q\right) \oplus \left(Q \oplus 0\right)\right)$

$\implies \left(1 \oplus P \right) \oplus \left( \left( P \oplus Q \right ) \oplus \left(P \oplus Q \right) \right) \oplus \left(Q \oplus 0\right)$

$\implies \left(1 \oplus 0 \right) \oplus \left( P \oplus Q \right) $

$\implies 1 \oplus \left( P\oplus Q \right)$

$\implies \overline {\left( P \oplus Q\right)}$

$\left( \left(1 \oplus P \right) \oplus \left( P \oplus Q \right )\right ) \oplus \left(\left(P \oplus Q\right) \oplus \left(Q \oplus 0\right)\right)$

$\implies \left(1 \oplus P \right) \oplus \left( \left( P \oplus Q \right ) \oplus \left(P \oplus Q \right) \right) \oplus \left(Q \oplus 0\right)$

$\implies \left(1 \oplus 0 \right) \oplus \left( P \oplus Q \right) $

$\implies 1 \oplus \left( P\oplus Q \right)$

$\implies \overline {\left( P \oplus Q\right)}$

+10 votes

Since there are only 2 variables putting in pair of values of P and Q in F and checking with the options is a time saving method.

But Lets solve it.

0 votes

observe the common term p ex or q in both

consider a case where p and q are equal

then p ex or q results in 0

1)in first p is ex ored with 1

2)in second q is ex ored with 0

so if p, q are same then either of one oresults in 1 and another to 0

1 ex or 0

it is exnor

consider a case where p and q are equal

then p ex or q results in 0

1)in first p is ex ored with 1

2)in second q is ex ored with 0

so if p, q are same then either of one oresults in 1 and another to 0

1 ex or 0

it is exnor

0 votes

We need to simplify the above expression. As the given operation is XOR, we shall see property of XOR. Let A and B be boolean variable. In A XOR B, the result is 1 if both the bits/inputs are different, else 0. Now,

( ( 1 X P) X (P X Q) ) X ( (P X Q) X (Q X 0) ) ( P' X P X Q ) X ( P X Q X Q ) ( as 1 X P = P' and Q X 0 = Q ) (1 X Q) X ( P X 0) ( as P' X P = 1 , and Q X Q = 0 ) Q' X P ( as 1 X Q = Q' and P X 0 = P ) PQ + P'Q' ( XOR Expansion, A X B = AB' + A'B ) This is the final simplified expression. Now we need to check for the options. If we simplify option D expression. ( P X Q )' = ( PQ' + P'Q )' ( XOR Expansion, A X B = AB' + A'B ) ((PQ')'.(P'Q)') ( De Morgan's law ) ( P'+ Q).(P + Q') ( De Morgan's law ) P'P + PQ + P'Q' + QQ' PQ + P'Q' ( as PP' = 0 and QQ' = 0 ) Hence both the equations are same. Therefore Option D.

- All categories
- General Aptitude 1.6k
- Engineering Mathematics 7.5k
- Digital Logic 3k
- Programming & DS 4.9k
- Algorithms 4.3k
- Theory of Computation 6k
- Compiler Design 2.1k
- Databases 4.2k
- CO & Architecture 3.5k
- Computer Networks 4.2k
- Non GATE 1.4k
- Others 1.5k
- Admissions 585
- Exam Queries 572
- Tier 1 Placement Questions 23
- Job Queries 72
- Projects 18

50,126 questions

53,251 answers

184,757 comments

70,502 users