Content deleted Content added
→Wrap around, Signed/Unsigned, mixed message: new section |
No edit summary |
||
Line 23:
:'''Example: 16 bit signed integer''': 30000 + 30000 = −5536.
The example given here of a negative number resulting from addition is an example of a signed integer overflow, but its usage immediately after the statement about C programming behavior is contradictory. I don't know enough about C programming to know whether the statement that "signed overflow produces undefined behavior, while unsigned overflow produces wrap around" is accurate or transposed. If it is accurate, the example should be changed to, perhaps, 35000 + 35000 = 4464; otherwise, the words "signed" and "unsigned" words should be swapped to be accurate in the preceding statement.
:: Signed overflow is undefined in C. I changed the example to prevent confusion. [[User:Hiiiiiiiiiiiiiiiiiiiii|Hiiiiiiiiiiiiiiiiiiiii]] ([[User talk:Hiiiiiiiiiiiiiiiiiiiii|talk]]) 01:52, 13 January 2014 (UTC)
[[Special:Contributions/199.2.205.141|199.2.205.141]] ([[User talk:199.2.205.141|talk]]) 14:15, 29 October 2013 (UTC)
|