Sometimes, when the decision to do one action or another seems too confusing and convoluted to get your arms around, try writing down the Boolean algebra or applying a Karnaugh map. You might find ...
Canonical and fundamental forms of Boolean functions. Function expansion and its applications to digital circuit design. Minimization of Boolean functions by Boolean algebra and Karnaugh maps.