Latest comment: 1 year ago by 2600:100C:B04A:F440:5D37:C13A:BA20:6B12 in topic NFC g guy yu

Are half the possible values negative? edit

<< roughly half the possible values are negative values

would it be better (or indeed correct?) to say:

<< half the possible values are non-positive values


Tomscambler (talk) 16:35, 15 January 2009 (UTC)Reply

Actually, that would be wrong because exactly half of the possible values are negative values. E.g. for an 8 bit int, the range is -128 to +127. That's 128 negative, 1 zero and only 127 positive. (talk) 02:34, 2 September 2015 (UTC)Reply
As of this writing:
  1. This topic relates to the second paragraph of the entry.
  2. looks like the paragraph has been updated to include both contributors comments. (talk) 13:33, 31 December 2015 (UTC)Reply

garbage value? edit

"Lets take an example in C. unsigned x=-1; printf("%u",x); The output is garbage value."

The output is not a garbage value. Garbage is what's left in a declared, uninitialized location. The output here is predictable, it should be 65,553, assuming x is a 16 bit word/char and the compiler typecasts (if it doesn't, it wouldn't compile that anyway). Speaking of which, unsigned can't be applied like that, not without a variable type (another reason that wouldn't compile). Also.. this article should maybe explain how signed binary works, and why it's most efficient for common instruction sets. LieAfterLie (talk) 07:07, 30 September 2010 (UTC)Reply

NFC g guy yu edit

Constant teen 2600:100C:B04A:F440:5D37:C13A:BA20:6B12 (talk) 06:06, 30 November 2022 (UTC)Reply