Jump to content

Integer overflow

From Simple English Wikipedia, the free encyclopedia
Revision as of 02:29, 11 January 2013 by Auntof6 (talk | changes) (added Category:Computers using HotCat)
A mechanical form of integer overflow. All digits are set to the maximum 9, and adding 1 causes it to reset to 0.

Integer overflow occurs in computers, when the number which is stored becomes larger than the capacity of the memory it is stored in. The most likely result is that the number will reset to 0 and start over.

For example, start with the number 14, using 4-bits integers. Add 1 a few times, this wil result in an overflow, which causes it to reset the number to 0.

Binair number Decimal number
1110 14
1111 15
0000 0
0001 1