Difference between revisions of "$not"
From Scriptwiki
(Only one parameter, compared against max value.) |
|||
Line 1: | Line 1: | ||
− | Performs a bit-wise NOT comparison | + | Performs a bit-wise NOT comparison between 4294967295 and the given number. |
− | $not(number | + | $not(number) |
==Something to Consider== | ==Something to Consider== | ||
mIRC deals with all numbers as DWORDs (4-byte integers with a max value of 11111111111111111111111111111111 or 4294967295 in decimal). | mIRC deals with all numbers as DWORDs (4-byte integers with a max value of 11111111111111111111111111111111 or 4294967295 in decimal). | ||
− | Therefore, | + | Therefore the number which the given integer is compared against will be the max value, and the given number will always have 32 bits. |
==Examples== | ==Examples== | ||
− | $not( | + | $not(5) |
Binary values of each: | Binary values of each: | ||
− | + | 11111111111111111111111111111111 | |
− | + | 00000000000000000000000000000101 | |
− | Leaving the bits which are '''NOT''' in | + | Leaving the bits which are in 4294967295 but '''NOT''' in 5 |
− | Returns: | + | Returns: 4294967290 (11111111111111111111111111111010) |
[[Category:Bitwise Identifiers]] | [[Category:Bitwise Identifiers]] |
Latest revision as of 20:03, 9 May 2008
Performs a bit-wise NOT comparison between 4294967295 and the given number.
$not(number)
Something to Consider
mIRC deals with all numbers as DWORDs (4-byte integers with a max value of 11111111111111111111111111111111 or 4294967295 in decimal). Therefore the number which the given integer is compared against will be the max value, and the given number will always have 32 bits.
Examples
$not(5)
Binary values of each:
11111111111111111111111111111111 00000000000000000000000000000101
Leaving the bits which are in 4294967295 but NOT in 5
Returns: 4294967290 (11111111111111111111111111111010)