[WEBINAR] The New Normal: Dealing with the Reality of an Unsecure World

Integer Overflow

Definition - What does Integer Overflow mean?

Integer overflow is the result of an attempt by a CPU to arithmetically generate a number larger than what can fit in the devoted memory storage space. Arithmetic operations always have the potential of returning unexpected values, which may cause an error that forces the whole program to shut down. For this reason, most programmers prefer to perform mathematical operations inside an exception frame, which returns an exception in the case of integer overflow instead.

Techopedia explains Integer Overflow

One example of integer overflow could occur when a program developer does not allow for the occurrence of a negative number. In this case, if a variable performs an operation resulting in a negative number, an overflow occurs and the variable is returned as a positive integer. Another example of integer overflow would be dividing a number by zero, which mathematically yields a large number with an infinite value.

A processor's behavior in the event of an integer overflow differs from one processor to another. Graphics processing units and digital signal processors are engineered to deal with many arithmetic conditions, including integer overflow. In an instance of integer overflow, these processors typically return the maximum number allowed.

Techopedia Deals

Connect with us

Techopedia on Linkedin
Techopedia on Linkedin
"Techopedia" on Twitter

Sign up for Techopedia's Free Newsletter!

Email Newsletter

Join thousands of others with our weekly newsletter

Free Whitepaper: The Path to Hybrid Cloud
Free Whitepaper: The Path to Hybrid Cloud:
The Path to Hybrid Cloud: Intelligent Bursting To Amazon Web Services & Microsoft Azure
Free E-Book: Public Cloud Guide
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.