complement

complement definition - computer

The number derived by subtracting a number from a base number. For example, the tens complement of 8 is 2. In set theory, complement refers to all the objects in one set that are not in another set.

Complements are used in digital circuits, because it's faster to subtract by adding complements than by performing true subtraction. The binary complement of a number is created by reversing all bits and adding 1. The carry from the high-order position is eliminated. The following example subtracts 5 from 8.

     Decimal    Binary    Complement
      8          1000      1000
     -5         -0101     +1011
     __         _____     _____
      3          0011      0011





Computer Desktop Encyclopedia THIS DEFINITION IS FOR PERSONAL USE ONLY
All other reproduction is strictly prohibited without permission from the publisher.
Copyright © 1981-2009 by Computer Language Company Inc. All rights reserved.

Comments
Improve this definition.
Do you have more to add? Share your linguistic knowledge or observation.
/Register to save your comments.
Related Discussions (3)
TopicRepliesLatest Post
Adjective phrase or complement?77 months ago
Object Complement28 months ago
Object or Object Complement?158 months ago

Browse Forums