Generate a unique number that is formed from 2 numbers and vice versa? <p>I am not sure if this is possible but,</p> <p>I have 2 numbers, a 32-bit int x and a 64-bit long y.</p> <p>Given that 'y' is ALWAYS unique.</p> <p>Given these numbers, I want to generate a unique identifier which is a 32-bit int. I should also be able to construct the individual numbers back from the unique identifier. Is this possible? I apologize if this is the wrong forum to ask, but this is related to C# programming on a project i am working on.</p> <p>Basically, 'x' refers to a categoryID and 'y' refers to a unique 'categoryItemId' in my database, a single category can have a million of catalogItems.</p> <p>Thanks!</p>