Difference between revisions of "Category:Bitwise Identifiers"
m (Missed a link) |
m (Forgot to give the category a category, >.>) |
||
Line 15: | Line 15: | ||
For more information on bits and bytes, see Google. | For more information on bits and bytes, see Google. | ||
+ | |||
+ | [[Category:Text and Number Identifiers]] |
Latest revision as of 20:19, 9 May 2008
Bitwise operations are mathematical operations done on numbers that can be seen when comparing the binary values of the number. Binary values are another way of writing a number, using a base 2 system. Numbers can be converted from decimal (the normal counting system) to binary using $base.
The Principal
When considering bitwise operations, it helps to compare two binary values of numbers. In many of the examples given for the bitwise identifiers in this wiki, the numbers used are 5 and 6. To get the binary values of these numbers, we use $base.
$base(5,10,2) = 101 $base(6,10,2) = 110
Each digit above is a bit, therefore $base returns 3 bits for each number. The smallest unit of storage for a computer system is a single byte, which is comprised of eight bits, therefore we will add five 0s to the beginning of each number in our examples to show that we are dealing with one full byte. Adding 0s to the beginning of a number has no affect on its value, which is why $base removes them for us.
5 = 00000101 6 = 00000110
Note that mIRC uses DWORD values to store numbers, which on most systems is defined as 4 bytes, or 32 bits. Therefore the maximum number possible is 11111111111111111111111111111111 (32 bits long), which by using $base(11111111111111111111111111111111,2,10) we see translates into 4294967295.
For more information on bits and bytes, see Google.