Results 1 to 2 of 2

Math Help - Complement Addition

  1. #1
    Junior Member
    Joined
    Oct 2007
    Posts
    34

    Complement Addition

    How do you use "Complement Addition" to subtract binary, hexadecimal, and decimal numbers?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member
    earboth's Avatar
    Joined
    Jan 2006
    From
    Germany
    Posts
    5,829
    Thanks
    123
    Quote Originally Posted by SMAlvarez View Post
    How do you use "Complement Addition" to subtract binary, hexadecimal, and decimal numbers?
    1. You can use this method only if you have a limited number of digits to write a number.

    2. You have to use a carry bit for these operations.

    3. You have to calculate the compliment of a number first.

    Examples:

    a) decimal numbers with 4 digits. The first digit is reserved for the sign of the number: 0 = + and and the highest possible digit (here: ) 9 = -

    If you want to calculate 0273 - 0086 you first calculate the compliment of 0086 by determining the difference of each digit to highest possible digit (=9). You'll get 9913. Set the carry bit to 1 (indicating that you want to subtract):
    Code:
    number:    0273
    compl.:    9913
    carry:        1
    ------------------
            (9)0187
    The 9 in brackets is invisible because you have only 4 digits to write the number.

    b) binary numbers with 8 digits. Use exactly the same method but note that now the highest possible digit is 1.
    If you want to calculate 13_{dec} - 7_{dec} that means 00001101 - 00000111 you first calculate the compliment of 00000111 by determining the difference of each digit to highest possible digit (=1). You'll get 11111000. Set the carry bit to 1 (indicating that you want to subtract):
    Code:
    number:    00001101
    compl.:    11111000
    carry:            1
    --------------------
            (1)00000110
    And 110_{bin} = 6_{dec}. The 1 in brackets is invisible because you have only 8 digits to write the number.

    c) With hexadcimal numbers you only have to consider that you have 16 different digits and that highest possible digit is F. Use exactly the same method as demonstrated above.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. two's complement
    Posted in the Number Theory Forum
    Replies: 2
    Last Post: January 26th 2011, 02:06 PM
  2. orthogonal complement
    Posted in the Advanced Algebra Forum
    Replies: 1
    Last Post: November 17th 2010, 08:23 PM
  3. 10's complement
    Posted in the Advanced Math Topics Forum
    Replies: 2
    Last Post: March 25th 2010, 06:01 PM
  4. complement help
    Posted in the Discrete Math Forum
    Replies: 3
    Last Post: September 24th 2009, 10:49 AM
  5. 2s Complement
    Posted in the Discrete Math Forum
    Replies: 4
    Last Post: June 6th 2008, 08:00 AM

Search Tags


/mathhelpforum @mathhelpforum