You are on page 1of 2

Evans,

Awesome post. I like how you pointed out that Overflow can result
from the “result of adding two numbers <that will> be too long,” thus
taking “much space to be fit and the allotted space will not be enough.”
“The condition of overflow will arise because it will go beyond the
range.”

I especially like how you highlighted that when adding two unsigned
numbers, “the carry will be come out from the leftmost digit and it
causes overflow condition in the context of unsigned numbers.”
That is how I summed up overflow—meaning: overflow is a situation
that occurs when the result of an arithmetic operation exceeds the
maximum or minimum value that can be represented by the data type
used to store the value. (i.e., when the magnitude of a number
exceeds the range allowed by the size of the bit field).

Great job offering examples to reinforce your point. Specifically, you


noted, when we are adding two numbers of same sign and the result
will be of the other sign, it causes an overflow.
Yet, how can it be detected?  I offered that Overflow can be detected
by examining the result of an arithmetic operation and comparing it to
the maximum or minimum value that can be represented by the data
type used. If the result is larger than the maximum value or smaller
than the minimum value, an overflow has occurred.
Best
Dan

You might also like