Binary data -> number
| From: | Adam Atlas | Date: | Wed, 16 Apr 2003 01:37:24 +0000 |
| Subject: | Binary data -> number | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-144051@lists.php.net to get a copy of this message | ||
I have some code that reads binary data (a series of bytes representing numbers, not ASCII characters) and I want to know how I'd extract the numerical value of multiple bytes. For example, if I had two bytes with the hex value 0xFFFF, I'd like to know how to get its decimal value, 65535 (I think). (But remember, this is just binary data, not a string representation of hex or binary.)
Thanks,
Adam Atlas
~~~
Adam Atlas
Error: Keyboard not attached. Press F1 to continue