Integer overflowFrom Wikipedia, the free encyclopediaOdometer rollover, a mechanical form of integer overflow. All digits are set to the maximum 9, and adding 1 causes a cascade of carry-over additions setting all digits to 0 but there is no higher digit to change to a 1, so the counter resets to zero.In computer programming, an integer overflow occurs when an arithmetic operation attempts to create a numeric value that is too large to be represented within the available storage space. For instance, adding 1 to the largest value that can be represented constitutes an integer overflow. The most common result in these cases is for the least significant representable bits of the result to be stored (the result is said to wrap). On some processors like GPUs and DSPs, the result saturates; that is, once the maximum value is reached, attempts to make it larger simply return the maximum result.
đang được dịch, vui lòng đợi..