Similar questions 6 more →
Number Systems & Computer Arithmetic

Answer & solution
Official answer: B, C
Step through it (8 steps)
Givens and goal
X and Y are 8-bit sign-magnitude words 10110100 and 01001100. Which results cannot be represented as an 8-bit sign-magnitude Z: A X+Y; B X−Y; C −X+Y; D −X−Y?
Approach
Decode sign and magnitude separately, calculate the mathematical result of each operation, and compare with the representable interval.
Step-by-step solution
1. One bit is the sign and seven bits hold the magnitude. The largest magnitude is 27−1=127, so representable values lie from −127 to +127. There are separate encodings of zero; there is no −128 value.
2. X has sign 1 and magnitude 0110100₂=32+16+4=52, so X=−52. Y has sign 0 and magnitude 1001100₂=64+8+4=76, so Y=+76.
3. A gives X+Y=−52+76=24, which is representable. B gives X−Y=−52−76=−128, below the minimum, so it overflows.
4. C gives −X+Y=52+76=128, above the maximum, so it overflows. D gives −X−Y=52−76=−24, which is representable.
5. Select B and C. The raw bit patterns must not be interpreted as two’s-complement values: that different representation would assign a different value to X and a different representable lower bound.