1. Homepage
  2. Homework
  3. Introduction to Computer Systems - Sign-and-magnitude Representation

Introduction to Computer Systems - Sign-and-magnitude Representation

Engage in a Conversation
This question has been solved

Question #3 CourseNana.COM

Before the two’s-complement representation of signed binary numbers was invented, some computers used sign-and-magnitude representation. In this representation, the most significant bit is only the sign of the number (0 for positive, 1 for negative); it has no place value.  The remaining bits are interpreted as an unsigned number.  For instance, the four-bit number 1011 in sign-and-magnitude represents -3, and 0101 represents 5. CourseNana.COM

  CourseNana.COM

a.     If you add the four-bit sign-and-magnitude numbers 0100 and 0101 using unsigned addition, what is the value of the result, interpreted as sign-and-magnitude?
CourseNana.COM


CourseNana.COM

CourseNana.COM

b.     If you add the four-bit sign-and-magnitude numbers 0010 and 1001 using unsigned addition, what is the value of the result, interpreted as sign-and-magnitude? CourseNana.COM


CourseNana.COM

CourseNana.COM

c.     If you add the four-bit sign-and-magnitude numbers 1010 and 1001 using unsigned addition, what is the value of the result, interpreted as sign-and-magnitude? CourseNana.COM

  CourseNana.COM

d.     Describe an algorithm for adding sign-and-magnitude numbers which will make sums involving negative numbers come out correctly.  For instance 0010 + 1001 should produce 0001 (1), and 1010 + 1001 should produce 1011 (-3).  Don’t worry about what happens on overflow in either direction. CourseNana.COM


CourseNana.COM


CourseNana.COM

CourseNana.COM


CourseNana.COM

CourseNana.COM


CourseNana.COM


CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp