First page Back Continue Last page Overview Graphics
Laboratory 3.2: Some Ambiguities
“Did overflow occur?”
- Are we assuming two's complement arithmetic?
- Isn't it overflow if we add two byte-sized unsigned numbers and the result is too large to fit into a byte?
- What if we add two word-sized unsigned numbers?
Are we asking about the result of the calculation or the setting of the overflow bit of the flag register? (i.e. Does it matter whether we are considering a suba or a cmpa?)