Let A and B be positive integers, and consider the
Chapter 1, Problem 1.42(choose chapter or problem)
Let A and B be positive integers, and consider the addition of A and B in an n-bit 2’s complement number system.
(a) Show that the addition of A and B produces the correct representation of the sum if the magnitude of (A + B) is \(< 2^{n-1} - 1\) but it produces a representation of a negative number of magnitude \(2^n - (A + B)\) if the magnitude of (A + B) is \(> 2^{n-1} - 1\).
(b) Show that the addition of A and (−B) always produces the correct representation of the sum. Consider both the case where \(A \geq B\) and the case A < B.
(c) Show that the addition of \((2^n - A) + (2^n - B)\), with the carry from the sign position ignored, produces the correct 2’s complement representation of −(A + B) if the magnitude of A + B is less than or equal to \(2^{n-1}\). Also, show that it produces an incorrect sum representing the positive number \(2^n - (A + B)\) if the magnitude of \((A + B) > 2^{n-1}\).
Unfortunately, we don't have that question answered yet. But you can get it answered in just 5 hours by Logging in or Becoming a subscriber.
Becoming a subscriber
Or look for another answer