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.

  1. Assume A and B are unsigned 8-bit binary integers. Calculate A − B. Is there overflow?
  2. Assume A and B are signed 8-bit binary integers in two's complement format. Calculate A + B. Is there overflow?
  3. 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)

  1. 01100110 - 00101100 = 00111010
    No overflow.
  2. 01100110 + 00101100 = 10010010
    Overflow (notice the result's sign bit)
  3. 01100110 + 11010100 = 00111010
    No overflow.