View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-16-2011 , 22:56   Re: [TUT] Hexadecimal system
Reply With Quote #5

I agree with you both, I would never use hex to replace simple numeric values just for the sake of using hex. Why use 0x13 when 19 will do? It would be especially confusing for those viewing code who are not versed in hexadecimal.

The only time I would agree with his statement is when working with bit masks. In this instance they are actually easier to use than decimal numbers.

1111 1111 = binary
255 = decimal
FF = hex

1111 0000 1111 0000 = binary
61680 = decimal
F0F0 = hex

1111 0000 1111 1111 1111 = binary
987135 = decimal
F0FFF = hex
__________________

Last edited by Bugsy; 08-16-2011 at 23:02.
Bugsy is offline