Complement: a number that when added

  • Thread starter jackson6612
  • Start date
In summary, a complement is a number that when added to another number of the same sign yields zero if the significant digit farthest to the left is discarded. This is commonly used in assembly language programming, where it is used for subtraction by converting the number to its complement and then adding it to the original number. This is especially useful in binary, where it is easier to convert to a complement and add rather than have a separate circuit for subtraction.
  • #1
jackson6612
334
1
http://www.merriam-webster.com/dictionary/complement" (noun)
2 c : a number that when added to another number of the same sign yields zero if the significant digit farthest to the left is discarded —used especially in assembly language programming
[M-W's Col. Dic.]

Could you please tell me what this definition means? Please remember I'm not a math student.
 
Last edited by a moderator:
Mathematics news on Phys.org
  • #2
jackson6612 said:
http://www.merriam-webster.com/dictionary/complement" (noun)
2 c : a number that when added to another number of the same sign yields zero if the significant digit farthest to the left is discarded —used especially in assembly language programming
[M-W's Col. Dic.]

Could you please tell me what this definition means? Please remember I'm not a math student.

Some examples:

In base 10, the compliment of 3 would be 7 because 3+7 = 10 and if you discard the 1, you are left with 0

Thus 4 is the compliment of 6, 8 of 2, etc.

The compliment of 55 would be 45, because 55+45=100 and removing the 1 leaves you with 0 again.

With binary, the compliment of 1 is 1 because 1+1 =10

The compliment of 1010 would be 0110 because 1010 + 0110 = 10000 in binary.

This is handy because compliments can be used for subtraction.
Say you want to subtract 3 from 7. you can do this by converting the 3 to its compliment(7) and add it to 7. This gives you 7+7=14. discard the 1 and you get 4. This is cumbersome with base ten, but works well with binary.

If you take 1010, and convert the 1s to 0s and the zeros to 1, you get 0101, if you then add 1 to this, you get 0110. This works for every binary number.

So it is very easy to convert to a binary compliment.

So for computers, it is simpler to convert to a compliment and add, rather than having a second circuit for subtraction.
 
Last edited by a moderator:

FAQ: Complement: a number that when added

What is a complement in mathematics?

A complement, in mathematics, is a number that when added to another number, results in a specific value. This value is usually a multiple of 10, 100, 1000, and so on.

How do you find the complement of a number?

To find the complement of a number, you can subtract the number from the next highest multiple of 10, 100, 1000, and so on. For example, the complement of 23 would be 77, since 77 + 23 = 100.

What is the relationship between a number and its complement?

The relationship between a number and its complement is that they always add up to a multiple of 10, 100, 1000, and so on. This means that the sum of a number and its complement will always end in 0.

Can a number have more than one complement?

Yes, a number can have multiple complements. For example, the number 50 has two complements: 50 + 50 = 100 and 50 + 50 + 50 = 150.

What is the significance of complements in mathematics?

Complements are important in mathematics because they help us understand patterns and relationships between numbers. They are also useful in mental math and can make calculations easier and faster.

Similar threads

Back
Top