While factorization of inputs is a labor saving device, it also affects the logic of the table and how it is implemented in code. The table is evaluated from top to bottom, and from left to right. The generated code, as well as the simulator, matches this behavior.
Here is an example of factorization:
This is the resulting logic, shown as pseudo-code:
Note that factorization of inputs is allowed from left to right only. Reading from left to right, each subsequent factorization of inputs must be a subset of all those to the left, as this example illustrates.
The next two examples show incorrect implementations of factorization to further illustrate the points explained above.
Incorrect factorization - Example 1:
Note that in this example, input column 2 is a subset of input column 1, and this is not allowed.
Incorrect factorization - Example 2:
Note that in this example, column 2 was not built so that each factorization is a subset of all those to the left of it.