Problem Set 7, Overflow
Due Friday, February 18 @ 11:59PM
Submit your answers to blackboard. Be sure to show your work (if necessary).
For these problems, assume that A = 102ten and B = 44ten.
- Assume A and B are unsigned 8-bit binary integers. Calculate A − B. Is there overflow?
- Assume A and B are signed 8-bit binary integers in two's complement format. Calculate A + B. Is there overflow?
- Assume A and B are signed 8-bit decimal integers stored in two’s complement format. Calculate A − B. Is there overflow?
Rubric (30 points)
- 01100110 - 00101100 = 00111010
No overflow.
- 01100110 + 00101100 = 10010010
Overflow (notice the result's sign bit)
- 01100110 + 11010100 = 00111010
No overflow.