>I expected that the result of bintoc(0,1) would be chr(0) - in fact it is chr(128), or 80 hex. Further tests showed that all bintoc() results have 128 added to the most significant byte.
>Ex:
>bintoc(255) results in chr(128)+chr(255) (hex 80 FF)
>bintoc(256) results in chr(129)+chr(0) (hex 81 00)
>
>Why is this?
>
>TIA
So it reserves for negative numbers. It uses it as a flag also. For neg numbers it's less than 128 down to 0.
Cetin