70 likes | 305 Views
Radix-Complement Representation of Signed Numbers (esp. Two’s-Complement Representation). Signed magnitude representation was easy However, it required sign and magnitude checks when doing arithmetic to determine whether to do + or – operation.
E N D
Radix-Complement Representation of Signed Numbers (esp. Two’s-Complement Representation) • Signed magnitude representation was easy • However, it required sign and magnitude checks when doing arithmetic to determine whether to do + or – operation. • In the radix-complement representation, a number is negated by subtracting it from • This is more difficult than negating signed magnitude numbers. • However, addition/subtraction is easy, like with unsigned numbers. • Thus the radix-complement rep is more popular than signed magnitude.
Two’s Comp Addition Much like unsigned addition!
Two’s Comp Overflow Detection • Overflow occurs iff • the addends’ signs are the same, and, • the sign bit of result is different