0% found this document useful (0 votes)
48 views1 page

CSC 340

Karen explained overflow as occurring when trying to store a number too large for the allocated number of bits. She reinforced this with an example of adding 7 and 14 using only 4 bits of storage, which results in 21, a number too large to represent with only 4 bits. Dan summarized overflow as the result of an operation exceeding the maximum or minimum value representable by the data type. He explained overflow can be detected by comparing the operation's result to the data type's bounds and checking if it is larger than the maximum or smaller than the minimum.

Uploaded by

Daniel s
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views1 page

CSC 340

Karen explained overflow as occurring when trying to store a number too large for the allocated number of bits. She reinforced this with an example of adding 7 and 14 using only 4 bits of storage, which results in 21, a number too large to represent with only 4 bits. Dan summarized overflow as the result of an operation exceeding the maximum or minimum value representable by the data type. He explained overflow can be detected by comparing the operation's result to the data type's bounds and checking if it is larger than the maximum or smaller than the minimum.

Uploaded by

Daniel s
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Karen,

Very good job explaining “What is overflow?” I like how you pointed
out that “An overflow happens when you try to store a number or value
that is too large for the number of bits that you have allocated for
storage.”
I especially like how you reinforced that definition with this example:
3-bits can store values from 0 to 7
4-bits can store values from 8 to 15
And you want to add the following numbers using an allocated storage
of 4-bits:
0111     (7)      
+1110  +(14)
1 0101    (21)
In my own post, I summed up overflow as being: 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).
That begs the question of “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