Posted on 2006-11-19
I need a system of making exclusive number codes. Say i have a few products, like:
and then I just enumerate them:
hammer = 0,
how can I make a number that uniquely identifies any combination of them? Like I get the #6 and that is the combination of hammer and wedge - a zero means only a hammer, etc. I don't have any requirements, just that when I get the final number, I can decompose it into the product types that made it up.