Integer Addition

by Steve O'Hara

In Mathematics, if you add a positive number Y to X, then X+Y is always greater than X.

In Computers, this is not always the case. Here is an example. See if you can find the problem. The answer is hidden below.


Javascript
PHP
XX+10
123456789123456799
21474836472147483657
-2147483648-2147483638
Python
Java



Last Updated on 9/28/2016
Email: steve@oharasteve.com