ÚÑÈí  Mark    Scores  Data

 

  Previous (Page 21)Next (Page 23)
One’s Complement Method
   



This method also uses the most significant bit (the one on the far left) to represent the sign of a number; if 0, the number is positive, if 1, the number is negative. For positive numbers, the rest of the bits are used to determine the number’s decimal magnitude. This method reverses the sign of a number by determining its one’s complement. Therefore, the decimal magnitude of a negative number equals the magnitude of its one’s complement.

The one’s complement of a number is determined as shown. It can also be determined by reversing (getting the complement of) each bit (set it to 1 if 0 and to 0 if 1). A drawback of this method is that the number 0 is represented using two different bit combinations.

 
Page 22 of 23

Previous (Page 21)Next (Page 23)