What solutions have you come up with? I struggled with this today and wonder what kind of simpler solutions might there be.
I'm working on a stacker that can handle 1-4 quarters. I have four wires for shape quarters. If exactly one quarter is null, I direct the three remaining quarters to another stacker complex than if there were four, and so on.
I ended up testing each wire separately against all the other three (with xor gates) and then combining the conclusion and fried my brain. The design works but takes up space.