1
Let’s set up the truth table of f
:
w x y z f
0 0 0 0 1
0 0 0 1 0
0 0 1 0 1
0 0 1 1 1
0 1 0 0 1
0 1 0 1 0
0 1 1 0 1
0 1 1 1 1
1 0 0 0 0
1 0 0 1 0
1 0 1 0 1
1 0 1 1 0
1 1 0 0 0
1 1 0 1 0
1 1 1 0 1
1 1 1 1 0
Let’s reorder the table by placing the x
in the first column (and reorder the rows so that the set xwyz
is ordered from 0000 until 1111):
x w y z f
0 0 0 0 1
0 0 0 1 0
0 0 1 0 1
0 0 1 1 1
0 1 0 0 0
0 1 0 1 0
0 1 1 0 1
0 1 1 1 0
1 0 0 0 1
1 0 0 1 0
1 0 1 0 1
1 0 1 1 1
1 1 0 0 0
1 1 0 1 0
1 1 1 0 1
1 1 1 1 0
The first half of the table is equal to the second. That is to say, x
is irrelevant. Here’s how the remaining table looks:
w y z f
0 0 0 1
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 0
There are several possible expressions that express this truth-table, and they all necessarily depend on w
, y
and z
(there is no other irrelevant variable).
Other possible truth table ordering are these:
y w z f
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0
z w y f
0 0 0 1
0 0 1 1
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 0
Among the possible ways to express the content of these tables, we have:
(NOT w AND NOT z) OR (y AND NOT w) OR (y AND z)
- your solution.(NOT w AND NOT z) OR (y AND (NOT z OR NOT w))
- Lucas Percisi’s solution.(NOT w AND NOT y AND NOT z) OR (NOT w AND y AND NOT z) OR (NOT w AND y AND z) OR (w AND y AND NOT z)
- list of lines with 1 in truth tables.(NOT w AND NOT y AND NOT z) OR (NOT w AND y) OR (w AND y AND NOT z)
- simplification of 3.(NOT z AND (w <-> y)) OR (NOT w AND y)
- simplification of 4.IF w THEN (y AND NOT z) ELSE (y OR NOT z)
- usingw
as a test inIF
.IF y THEN (w NAND z) ELSE (w NOR z)
- usingy
as a test inIF
.IF z THEN (NOT w AND y) ELSE (NOT w OR y)
- usingz
as a test inIF
.(y AND NOT z) OR (w AND (y <-> z))
- separating the cases wherey
andz
are different from those where they are equal.(NOT w AND y) OR (NOT z AND (w <-> y))
- separating the cases wherew
andy
are different from those where they are equal.(NOT w AND NOT z) OR (y AND (w XOR z))
- separating the cases wherew
andz
are different from those where they are equal.
In my personal opinion, solution 7 is the simplest, but you may disagree. There is no way to simplify much more than these alternatives that are there.
Thank you Victor! The answer seems to me very complete and detailed, it will be of great help! If you don’t mind I have another question regarding this content, if you can help me too, follow the link : https://answall.com/questions/2571/express%C3%A3o-l%C3%B3gica-e-circuito-correspondent
– Dwcleb
In the second table it seems to me that when you switched from the X column to the W column, you actually just changed the letter, not the column configuration. And again you re-arrange W with Y and right after Y with Z, but the column settings of these letters are not modified, could clarify why?
– Dwcleb
@Dwcleb Response edited.
– Victor Stafusa