Assuming the sign-magnitude representation of binary numbers, what is the result of the -6+29?!

-6   ->    100110
29   ->    011101

The decimal result is 23 and there is no overflow for that. However, the binary addition shows 000011 with a 1 as carry bit. Why?


Straightforward binary addition only works for twos-complement representation. Sign-magnitude represenation is more complicated, which is why nobody uses it.

| cite | improve this answer | |
  • $\begingroup$ Sign-magnitude is used by floating point numbers... kind of... $\endgroup$ – peterwhy May 11 '16 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.