Ace Rimmer wrote:darth nuker wrote:frenchfrog wrote:I guess the hash token in an unsigned int printed as a signed int.
huh?
wiki, your friend wrote:In computing, signedness is a property of variables representing numbers in computer programs. A numeric variable is signed if it can represent both positive and negative numbers, and unsigned if it can only represent positive numbers.
Not to be all pedantic and shit, but a "wiki" is a particular kind of mass editable document on the interwebs. Wikipedia is an pseudo-encyclopedia built using wiki technology, i.e. it is a specific wiki. If you are referring to Wikipedia, you should probably spell it out, as there are lots of wikis.
Also, since no one has really spelled this out, here is why it is negative: on a computer, numbers are stored in a certain number of bytes. Each byte contains 8 bits, and each bit can store either a 1 or a 0 (on or off). Let us say that you have allocated 1 byte for a number. Then you can store either a 1 or a 0 in each byte for a total of 2^8=256 total numbers (permutations of eight taken two at a time -- the first number can be one of two options, the second one of two options, &c.). So, for instance, you could easily store the numbers 0-255 -- this would be a positive integer. Now, suppose that you have need for negative integers, as well. We can take the first bit of the byte, and say that if it is 0, the number is negative, or if it is 1, the number is positive. So, now you can store 127 positive numbers, the number 0, and 128 negative numbers. However, you still might have the same pattern of bytes.
For instance, let us say that the byte is storing the following:
If we tell the computer that the number is an unsigned integer, it assumes that the number is positive, an will interpret the number as 32+16+8+2 = 58. However, if we tell the computer that the number is a signed int, it will see the first digit, and consider the number to be negative (it actually comes out to be -58, in this case).
So, frenchfrog was saying that there is probably some value that Multiwinia is storing as an unsigned int (i.e. a positive integer), but which is being displayed/printed as a signed integer.
xander