Skip to content
๐Ÿฅจ Binary Complement Forms

๐Ÿฅจ Binary Complement Forms

Complements are alternate representations of numbers that enable subtraction via addition. Theyโ€™re used in digital systems to simplify arithmetic operations, especially subtraction and signed number representation.

There are two major types:

  • Diminished Complement: One less than the full radix complement
  • Non-Diminished (Radix) Complement: The full complement relative to the base

Refer to Derivation of Method of Complements to understand why


๐Ÿ”ข Decimal Examples

Letโ€™s use base-10 (decimal) to illustrate:

1. Diminished Complement (9โ€™s Complement)

  • Defined as: $10^n - 1 - N$
  • Example: For 3-digit number 123 โ†’ $999 - 123 = 876$
  • Used in manual subtraction methods

2. Non-Diminished Complement (10โ€™s Complement)

  • Defined as: $10^n - N$
  • Example: For 3-digit number 123 โ†’ $1000 - 123 = 877$
  • Enables subtraction via addition with carry discard

๐Ÿ’ป Binary Counterparts

In binary (base-2), these concepts map directly to:

Decimal ConceptBinary EquivalentName
Radix Complement$2^n - N$2โ€™s Complement
Diminished Radix Complement$2^n - 1 - N$1โ€™s Complement

**2’s Complement โ€”โ€”โ€”โ€” $2^n - N$ **1’s Complement โ€”โ€”โ€”โ€” $2^n - 1 - N$

  • Thus we notice that:

1's Complement = 2's Complement - 1

  • Or similarly:

2's Complement = 1's Complement + 1


๐Ÿ” 1โ€™s Complement (Diminished)

  • Operation: Bitwise inversion (flip all bits)

Refer to Binary Complements Derivation to understand why

  • Example: 0101 โ†’ 1010
  • Used historically in older systems
  • Requires end-around carry during addition

Properties of 1’s Complement

  • Two representations of zero: 0000 (+0) and 1111 (โˆ’0)
  • Subtraction via: $A + (\text{1โ€™s complement of B}) + \text{carry}$

๐Ÿ” 2โ€™s Complement (Non-Diminished)

  • Operation: Bitwise inversion + 1

Refer to Binary Complements Derivation to understand why

  • Example: 0101 โ†’ 1010 โ†’ 1011
  • Dominant in modern computing
  • No need for end-around carry

Properties of 2’s Complement

  • Single representation of zero: 0000
  • Arithmetic is bitwise consistent
  • Overflow detection is straightforward
  • Enables signed number representation and subtraction using addition

๐Ÿง  Why 2โ€™s Complement Is Preferred

  • Hardware simplicity: Same adder circuit handles both addition and subtraction
  • No ambiguity: Only one zero
  • Efficient overflow detection: Based on carry into and out of MSB
  • Bitwise consistency: Arithmetic works identically across bit widths

๐Ÿงผ Summary Table

Complement TypeFormulaBinary FormNotes
Diminished (9โ€™s)$10^n - 1 - N$1โ€™s ComplementRequires end-around carry
Non-Diminished (10โ€™s)$10^n - N$2โ€™s ComplementPreferred in hardware
1โ€™s ComplementBitwise NOT~NTwo zeros, legacy use
2โ€™s Complement~N + 1-NSingle zero, modern standard
Last updated on