When Computers Count Past Their Limit
When a computer tries to calculate a number larger than its memory can hold, it does not crash. Instead, it resets back to the smallest possible value, effectively turning a huge positive number into a negative one.
This digital glitch happens because computer memory uses a fixed number of bits to store integers. Once that limit is reached, the binary sequence cycles back to zero like a car odometer hitting its maximum and rolling over to all zeros. This phenomenon has famously caused game characters to suddenly gain infinite health or massive score drops. It remains a critical concern for programmers building everything from banking software to space probes.
Source: Integer overflow