50. Full Subtractor Design

Loading simulator…

  • Output Difference Analysis: The Difference output turns on (1) whenever an odd number of inputs are high (either exactly one input is 1, or all three are 1). Like a full adder, this is implemented using two cascaded XOR gates in a row.
  • Output Borrow Analysis: The Borrow output turns on (1) when the net subtraction requires a borrow from the next stage. To save space and use fewer gates, the logic reuses the intermediate calculation from the first XOR gate by inverting it before combining it with Borrow In.
  • Hardware Optimization: Minuend A and Subtrahend B pass through a first stage of gates to produce a temporary difference and a temporary borrow. These terms feed into a secondary stage along with Borrow In, sharing common hardware paths to keep the overall gate footprint as small as possible.

Boolean Equations:

Output Difference = (Minuend A ^ Subtrahend B) ^ Borrow In
Output Borrow = (~Minuend A . Subtrahend B) + (Borrow In . ~(Minuend A ^ Subtrahend B))