Is it possible to simplify this boolean algebra? I want to remove the redundancy of using twice the X variable, but can't seem to see a way how.
(X AND Y) OR NOT(X AND Z)
Thanks in advance!
Is it possible to simplify this boolean algebra? I want to remove the redundancy of using twice the X variable, but can't seem to see a way how.
(X AND Y) OR NOT(X AND Z)
Thanks in advance!
It's equivalent to
(X AND Y) OR (NOT X OR NOT Z)
which is equivalent to
(X AND Y) OR NOT X OR NOT Z
which is equivalent to
(X OR NOT X OR NOT Z) AND (Y OR NOT X OR NOT Z)
which is equivalent to
(TRUE) AND (Y OR NOT X OR NOT Z)
(since X or NOT x == true
and TRUE OR Z == true
)
which is equivalent to
Y OR NOT X OR NOT Z
You can also use a K-map to find an equivalent logical expression, but those are harder to type :)
This is equal to !(X and !Y and Z).
You could also have the formula (!X or Y or !Z)
You could confirm the answers in http://www.wolframalpha.com/input/?i=%28X+AND+Y%29+OR+NOT%28X+AND+Z%29
In the Karnaugh map, you can see that your expression is indeed equivalent to a sum of three single-literal terms:
not x or y or not z
yz
00 01 11 10
+---+---+---+---+
0 | 1 | 1 | 1 | 1 |
x +---+---+---+---+
1 | 1 | 0 | 1 | 1 |
+---+---+---+---+
As pointed out by Elye, the single 0 can be expressed as an inverted term with three inputs:
not (x and not y and z)