Is the following distributive law valid or invalid? Prove your answer.
x XOR (y AND z) = (x XOR y) AND (x XOR z)
Method I:
Is the following distributive law valid or invalid? Prove your answer.
x XOR (y AND z) = (x XOR y) AND (x XOR z)
The given expression is X XOR(y AND z) = (x XOR y) AND( x XOR z)
To prove the given expression we have two methods by using Boolean algebra method and by using truth table method
X |
y |
x XOR y |
0 |
0 |
0 |
0 |
1 |
1 |
1 |
0 |
1 |
1 |
1 |
0 |
When both the inputs are different then XOR gate give ‘0’ and when both the inputs are same the XOR gate will give ‘1’
X |
y |
X AND y |
0 |
0 |
0 |
0 |
1 |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
When both the inputs are 1 then only the AND gate will give ‘1’ for remaining all conditions it will give ‘0’.
X |
y |
z |
y AND z |
X XOR(y AND Z) |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
1 |
0 |
0 |
0 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
0 |
0 |
1 |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
1 |
1 |
0 |
x |
y |
z |
x XOR y |
x XOR z |
(x XOR y)(x XOR z) |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
1 |
0 |
0 |
1 |
0 |
1 |
0 |
0 |
0 |
1 |
1 |
1 |
1 |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
1 |
0 |
1 |
1 |
0 |
0 |
1 |
1 |
0 |
0 |
1 |
0 |
1 |
1 |
1 |
0 |
0 |
0 |
From the above two truth tables we can conclude that the following distribute law is invalid x XOR (y AND z) = (x XOR y) AND (x XOR z)
Method II:
The given expression can be rewritten by using the following algebraic identities :- x AND y= x.y and x XOR y= x’y+xy’
In the expression the Left hand side(L.H.S) expression is :
= x XOR (y AND z)
= x XOR(yz)
=x(yz)’+x’(yz) {here we have to apply DeMorgans law (yz)’=y’+z’}
=x(y’+z’)+x’yz
=xy’+xz’+x’yz
The Right hand side expression is :
= (x XOR y) AND (x XOR z)
= (x’y+xy’) AND (x’z+xz’)
=(x’y+xy’) . (x’z+xz’)
=x’yz+xy’z’ {here we have to apply x.x’=0}
Hence the LHS and RHS are not equal we can conclude that the following distribute law is invalid x XOR (y AND z) = (x XOR y) AND (x XOR z)