Yesterday I had to fit an ICCID number (15-22 digits) in a 64 bits wide integer. Not possible, bad specification. This night I thought that a 72 bits integer could be used (there is a spare byte in the memory). That's not fully right : (2^72-1)-(10^22-1) is negative. But at least, it could be usefull for ICCID up to 20 digits.
One condition, find the algorithm to convert a string as char[20] into a table of 9 bytes. Fun.
#digits #integer #C #embeddedSystem








