Skip to main content

Full subtractor from half subtractors

Short answer

A full subtractor uses two half subtractors: first computes A⊕B and A'B; second computes (A⊕B)⊕Bin giving difference D, and (A⊕B)' Bin. An OR gate combines the borrows: Bo = A'B + (A⊕B)' Bin.

Design a full subtractor circuit using half subtractors and one OR gate.

A full subtractor subtracts BB and a borrow-in BinB_{in} from AA, giving difference DD and borrow-out BoB_o. A half subtractor subtracts YY from XX: D=X⊕YD = X \oplus Y, B=X′YB = X'Y.

Truth table and expressions

ABBinB_{in}DBoB_o
00000
00111
01011
01101
10010
10100
11000
11111
D=A⊕B⊕BinD = A \oplus B \oplus B_{in} Bo=A′B′Bin+A′BBin′+A′BBin+ABBin=A′B(Bin′+Bin)+Bin(A′B′+AB)=A′B+(A⊕B)′ Bin\begin{aligned} B_o &= A'B'B_{in} + A'BB_{in}' + A'BB_{in} + ABB_{in} \\ &= A'B(B_{in}' + B_{in}) + B_{in}(A'B' + AB) \\ &= A'B + (A \oplus B)'\,B_{in} \end{aligned}

Using two half subtractors and one OR gate

  • HS1 with inputs AA, BB: D1=A⊕BD_1 = A \oplus B, B1=A′BB_1 = A'B.
  • HS2 with inputs D1D_1, BinB_{in}: D=D1⊕Bin=A⊕B⊕BinD = D_1 \oplus B_{in} = A \oplus B \oplus B_{in}, B2=D1′Bin=(A⊕B)′BinB_2 = D_1'B_{in} = (A \oplus B)'B_{in}.
  • OR gate: Bo=B1+B2=A′B+(A⊕B)′BinB_o = B_1 + B_2 = A'B + (A \oplus B)'B_{in}, which matches the expression above.
        +-----+  D1   +-----+
A ----->| HS1 |------>| HS2 |----------> D
B ----->|     |  Bin->|     |
        +-----+       +-----+
           | B1          | B2
           +---->[OR]<---+
                   |
                   +-----------------> Bo

Check: A=0,B=1,Bin=1A=0, B=1, B_{in}=1: HS1 gives D1=1D_1 = 1, B1=1B_1 = 1; HS2 gives D=0D = 0, B2=0B_2 = 0; Bo=1B_o = 1. So 0−1−1=−20 - 1 - 1 = -2, i.e. D=0D = 0 with borrow 1. Correct.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Digital Logic chapter 5 questions →