Matt Gerrans
Posts: 1153
Nickname: matt
Registered: Feb, 2002
|
|
Re: 4 byte ASCII encoding
|
Posted: Jul 18, 2003 1:04 PM
|
|
It cannot be done. You are about 4 bits short.
American Standard Code for Information Interchange (ASCII) is a standard coding of 7-bit numeric codes to characters.
2^(7*4) = 2^28 = 0x10000000 = 268435456 decimal, which is much less than 2174000000 (or 0x81949B80 in hex), so you are out of luck. In other words, to get the range you want, you'll need all 32 bits.
Or maybe I misinterpreted your question? Maybe you mean something else by "4 byte ascii encoded format"? Maybe you just want to encode it as base64 or something like that?
|
|