I test in Quartus II. Result was wrong. Try to substitute your schematic circuit use truth table. You will see it.
The difference between the original (using INVERTORs, AND and OR gates) and the simplified circuit is only in possible hazards that are more likely to happen in the second (the simplified) one (due to more different delays of individual branches of the circuit).
The original circuit posted by
trojsi is described as follows:
(1)
factoring out /S1 from the first two terms and S1 from the following two yields (simplified expression, as to gate count):
(2)
applying De Morgan we obtain:
(3)
this expression describes exactly the circuit originally posted by
qieda.
It means the circuits both implement
the same logic function (and therefore have
identical truth tables),
but the output signal of the simplified circuit "suffers" more from hazards (as I wrote above; this fact is not necessarily a bad thing, it depends on the intended use).
Note:
applying De Morgan right on the original expression (1) we obtain:
(4)
so, if we don't insist on two-input NAND gates, the resulting circuit can be even simpler (gate count wise):