Avoid logic gates overlap