An engineering question: how can I convert a 96 bit to 18 bit

44 Views Asked by At

I have 262143 devices (about 18 bits counter) and each device has an unique identification code which is a 96 bits. I need a function that gets each device identification code and generates a unique number between 1 to 262143.

I will be grateful if you could help me.