Im working with bytes and hex in MMF at the moment.
MMF can without any trouble...
Converting from Single Unsigned bytes to HEX codes (255 -> FF)
Converting from HEX codes to Single Unsigned Bytes (FF -> 255)
The Binary object reads the bytes in Signed Bytes (-1, -2, etc) which is annoying, MMF is easily capable of converting Signed bytes into Unsigned Bytes
"( ( Byte + 256 ) mod 256 )"
Unfortunatly... I am unable to convert from Unsigned to Signed...
All i want to be able to do is work with bytes 0 to 255 (Unsigned), then convert it back to Signed and put it back into the Binary Object...
Can Anyone help me acomplish the opposite conversion ????
255 Unsigned is not 127 Signed
255 is supposed to be -1
But i actually did think for a minute Unsigned - 128 would have worked...
eg.
-50 -> 206 (when signed)
206 - 128 = 78 ??
Thanks though Tigerworks, any other ideas ??? anyone else ??? please ??? this has put me to a stop in my work...
Thanks in advance.
-----------------------------------------
Oh my god... okays.. if anyone needs help with this in the future.. i place the solution here.
I was using Microsoft Excel to test the calculations first, because it updates in realtime, then i could put it into MMF if sucessful, finally accidently done this... (I don't know if there is a simplier method but... YAY Finally ! (btw, thanks for help Tigerworks, i started putting random -128 here and there to experiment with... thas how i finally came to it working)
Unsigned -> Signed
( ( byte + 256 ) mod 256 )
Signed -> Unsigned
( ( ( byte + 128 ) mod 256 ) - 128 )