Calculating hex
#1

How to calculate 0xXXXXXXFF from 0xXXXXXX? I don't know how to operate on older bytes, so I assume there has to be some shifting.

#e: Argh, is it even possible to store this thing in single cell?

#e2
Solution:
Ok, so numbers over 0xFFFFFF are stored as negative:
pawn Код:
new a = 0xABCDEF;
new b = 0x000000FF;
new c = (a << 8) | b; //0xABCDEFFF
Reply


Messages In This Thread
[solved] Calculating hex - by Misiur - 04.03.2013, 15:55
Re: Calculating hex - by Azazelo - 04.03.2013, 17:50

Forum Jump:


Users browsing this thread: 1 Guest(s)