Error in overflow and carry flags We just force P to be selected for logical operations and P to be 0 as well. S2 will be same. Only P will be changed. $$P = \prod(3,5,6,7)$$ Which was obtained from a modified kmap.That's it.