in reply to Case Exhaustion Tree
This is an excellent approach to pick apart complicated logic and check that all bases are covered; essentially a Truth table in code.
As you noted, the number of cases grows rapidly with the inputs, so logic minimization techniques (tables with Don't-care terms and Karnaugh maps) can be really helpful to simplify that, as can separating the outputs.
I've often written out a truth table in comments above the (minimized) logic/code that implements it.
|
|---|