Digital Logic · Signed Number Representation and Overflow
Complementary Number Systems: Motivation (Subtraction Using Adders)
Overview
Complementary number systems are representation schemes designed so that subtraction can be performed using only an adder circuit.
This matters because subtraction hardware is more complex and costly than addition hardware, so converting subtraction into addition saves area and cost on a chip or motherboard.
Key concepts
- Complementary number system: A number representation scheme whose purpose is to allow subtraction to be performed using only an adder circuit.
Instead of building a separate subtractor, the subtraction problem is converted into an addition problem and fed to the existing adder. - Adder vs. subtractor: An adder is used to add two numbers; a subtractor is needed to subtract one number from another. Subtraction involves borrow, which makes it complicated to design as a circuit.
- Borrow propagation: When a borrow is needed, a bit may have to be borrowed from a higher position far away and brought back, which complicates the subtraction circuit.
- Cost and bulk: If an adder already exists on the chip or motherboard, adding a separate subtractor circuit makes the hardware bulky and costly; having both an adder and a subtractor is wasteful.
- Main advantage: Subtraction can be done using addition only.
How it works
- Adding two numbers uses an adder; subtracting one number from another normally requires a subtractor.
- Subtraction involves borrow. When a borrow is needed, a bit may have to be taken from a distant higher position and brought back, making subtraction complicated to design as a circuit.
- If an adder already exists on the chip or motherboard, adding a separate subtractor makes the hardware bulky and costly, so having both is wasteful.
- A complementary number system is proposed: a number representation in which subtraction is done using the addition circuit only.
- The topic is approached by derivation rather than by giving a formula to memorize with its conditions: why it works, where it was derived from, and why certain conditions hold.
Understanding the intuition behind the design is required to grasp why it works.
Revision summary
- The main reason for introducing complementary number systems is to perform subtraction using only an adder.
- Subtraction is harder to build in hardware than addition because of borrow propagation — the borrow may have to be taken from a distant higher bit.
- Avoiding a dedicated subtractor saves area (bulk) and cost on the chip or motherboard.
- Memorize the one-line advantage: subtraction can be done using addition only.
- Do not memorize the design blindly — the derivation and intuition (why it works, why the conditions hold) are what make it understandable.
Previous-year exam insights
- In two's complement, overflow occurs only when two numbers of the same sign are added and the result has the opposite sign; adding numbers of opposite signs never overflows.
Asked inGATE 2026GATE 2024GATE 2022 - In sign-magnitude representation, overflow can occur on addition or subtraction when the result's magnitude exceeds the largest representable magnitude; the sign bit alone does not determine overflow.
Asked inGATE 2026GATE 2019 - The range of an n-bit two's complement number is - to -1; the range of an n-bit sign-magnitude number is -(-1) to -1.
Asked inGATE 2024GATE 2019 - To represent the result of adding or subtracting two n-bit sign-magnitude numbers without overflow, n+1 bits are required.
Asked inGATE 2019 - In two's complement, subtraction X - Y is performed as X + (two's complement of Y), i.e., X + (~Y + 1); overflow rules for the equivalent addition apply.
Asked inGATE 2026GATE 2024 - Booth's multiplication algorithm performs one add/subtract operation per multiplier bit pair transition (0 to 1 or 1 to 0), including the implicit 0 appended to the right of the multiplier.
Asked inGATE 2025