Sign Magnitude – A simple approach

By | July 6, 2018

With sign magnitude we denote  one of the bits ( left one , also known as the most significant bit-MSB) to indicate whether a number is positive or negative. Usually  we set MSB ‘0’  to indicate the number is positive and a ‘1’ indicates the number is negative. Using this method we get the following:

MSB (B7) B6 B5 B4 B3 B2 B1 B0 Result
1 0 0 0 0 0 1 1 -3
0 0 0 0 0 0 1 1 3

In the example above we have numbers being represented using 8 bits. Where one bit (MSB) is used as a sign bit. Remember 1 is used for negative number and 0 is for positive. In the first row we have MSB=1 so number becomes -3 (- is for MSB 1 and 3 is binary of 0000011)

Leave a Reply

Your email address will not be published. Required fields are marked *