MATLAB: How to Add Two Sign Magnitude Numbers

additionbinary addersign magnitude

Hi all, anyone have the idea of how to add two sign magnitude numbers? Well, I think about binary adder but I just get confused about the sign and handling the overflow. Any advice?
Thank you.

Best Answer

binary adders are fine if you have binary input, but they are not very good if you are, for example, using Variable Base Arithmetic such as times represented in hours minutes and seconds.
Before you can design an addition routine for the numbers, you are going to need to define the properties of the source representations and of the desired output representations.