View Single Post
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 08-16-2011 , 23:35   Re: [TUT] Hexadecimal system
Reply With Quote #6

Quote:
Originally Posted by Bugsy View Post
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
Could you explain 'bit masks' a little bit more and the usage in AMXX scripting?

Thanks.
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345