Translate

Wednesday 6 June 2012

Signed Binary Numbers: Sign-Magnitude Representation

In the decimal number system a plus (+) sign is used to denote a positive number and a minus (-) sign is used to denote a negative number. The plus sign is usually dropped, and the absence of any sign means that the number has positive value. This representation of numbers is known as signed number. Digital circuits can understand only two symbols, 0 and 1; therefore we must use the same symbols to indicate the sign of the number also. Normally, an additional bit is used as the sign bit and it is placed as the most significant bit. A 0 is used to represent a positive number and a 1 to represent a negative number. For example, an 8-bit signed number 01000100 represents a positive number and its value (magnitude) is (1000100)2 = (68)10. The left most 0 (MSB) indicates that the number is positive. On the other hand, in the signed binary form, 11000100 represents a negative number with magnitude (1000100)2 = (68)10. The 1 in the left most position (MSB) indicates that the number is negative and the other seven bits give its magnitude. This kind of representation for signed numbers is known as sign-magnitude representation. The user must take care to see the representation used while dealing with binary numbers.

Exercise
Find the decimal equivalent of the following binary numbers assuming sign-magnitude representation of the binary numbers.

  1. 101100
  2. 001000
  3. 0111
  4. 1111
Solution:

1) Sign bit is 1, which means the number is negative.
     Magnitude = 01100 = (12)10
      (101100)2 = (-12)10

2) Sign bit is 0, which means the number is positive.
    Magnitude = 01000 = 8
    (001000)2 = (+8)10

3) (0111)2 = (+7)10

4) (1111)2 = (-7)10

No comments:

Post a Comment