Are there any functions I can use or do I have to write them myself? All kind of convertions between hex,dec,bin,ASCII.
I have strings with 32 byte that i count and do a checksum in the end.
ex. 0102030405060708090A0B0C0D0ECS
I also convert 2 byte to 1 and represent them in ASCII.
ex. 86 (1000 0110) => E in ASCII
I do like this now:
high = buffer.GetAt(i);
low = buffer.GetAt(i+1);
if(high >= 65)
high = high - 55;
else
high = high - 48;
if(low >= 65)
low = low - 55;
else
low = low - 48;
high = high << 4;
high = high + low;
i++;
summa += high;
I convert many times between hex to dec.
Thank you if you can help me
Martin
I have strings with 32 byte that i count and do a checksum in the end.
ex. 0102030405060708090A0B0C0D0ECS
I also convert 2 byte to 1 and represent them in ASCII.
ex. 86 (1000 0110) => E in ASCII
I do like this now:
high = buffer.GetAt(i);
low = buffer.GetAt(i+1);
if(high >= 65)
high = high - 55;
else
high = high - 48;
if(low >= 65)
low = low - 55;
else
low = low - 48;
high = high << 4;
high = high + low;
i++;
summa += high;
I convert many times between hex to dec.
Thank you if you can help me
Martin