FS Digital Subtractor Tool

Full Subtractor Calculator

Calculate the Difference and Borrow-Out of a full subtractor using binary inputs A, B and Borrow-In. View XOR, NOT, AND and OR logic, Boolean equations, truth-table values and step-by-step binary subtraction.

3 Binary Inputs Borrow-In Difference Borrow-Out Boolean Logic Truth Table
Full Subtractor Logic Calculator A − B − Bin
Binary bit being subtracted from.
Binary bit to subtract.
Borrow received from a less significant stage.
Full Subtractor Result
D=0 | Bout=0
Difference 0
Borrow-Out 0
Mathematical A − B − Bin 0
Input Operation 0 – 0 – 0
A XOR B 0
NOT A 1
Borrow Term 1 0
Borrow Term 2 0
Difference A XOR B XOR Bin
Borrow Term 1 NOT(A) AND B
Borrow Term 2 Bin AND NOT(A XOR B)
Inputs: A = 0, B = 0, Bin = 0
A XOR B = 0
Difference = A XOR B XOR Bin = 0
Borrow term 1 = NOT(A) AND B = 0
Borrow term 2 = Bin AND NOT(A XOR B) = 0
Borrow-Out = 0
Mathematical subtraction: 0 – 0 – 0 = 0

What Is a Full Subtractor?

A full subtractor is a combinational digital logic circuit that performs one-bit binary subtraction while also processing an incoming borrow from a less significant position.

The three inputs are normally called A, B and Borrow-In. A is the minuend bit, B is the subtrahend bit, and Borrow-In represents a borrow received from a previous subtraction stage.

The circuit produces a Difference output and a Borrow-Out output. Borrow-Out can be passed to the next more significant subtraction stage.

Full Subtractor Boolean Equations

Difference Equation

The Difference bit is obtained by XORing all three inputs.

Difference = A XOR B XOR Bin

Borrow-Out Equation

Borrow-Out indicates that the current stage requires a borrow from the next higher binary position.

Bout = [NOT(A) AND B] OR [Bin AND NOT(A XOR B)]

Alternative Full Subtractor Borrow Equation

The Borrow-Out function can also be represented in an expanded Boolean form.

Bout = NOT(A)B + NOT(A)Bin + BBin

Both forms describe the same full-subtractor borrow behavior.

Full Subtractor Truth Table

A B Borrow-In Difference Borrow-Out A − B − Bin
0 0 0 0 0 0
0 0 1 1 1 -1
0 1 0 1 1 -1
0 1 1 0 1 -2
1 0 0 1 0 1
1 0 1 0 0 0
1 1 0 0 0 0
1 1 1 1 1 -1

Worked Example 1: A = 1, B = 0, Bin = 1

A = 1
B = 0
Bin = 1

Mathematical subtraction:
1 − 0 − 1 = 0

Difference:
1 XOR 0 XOR 1 = 0

Borrow-Out:
0

Final:
Difference = 0
Borrow-Out = 0

Worked Example 2: A = 0, B = 1, Bin = 1

A = 0
B = 1
Bin = 1

0 − 1 − 1 = -2

A borrow is required from the next higher binary position.

Difference = 0
Borrow-Out = 1

Worked Example 3: A = 1, B = 1, Bin = 1

A = 1
B = 1
Bin = 1

1 − 1 − 1 = -1

Difference = 1
Borrow-Out = 1

How Full Subtractor Logic Works

Difference Stage

XOR logic combines A, B and Borrow-In to determine the Difference bit.

D = A XOR B XOR Bin

Direct Borrow Condition

When A is 0 and B is 1, the subtraction requires a borrow.

NOT(A) AND B

Borrow-In Condition

Borrow-In can force another borrow when A XOR B is 0.

Bin AND NOT(A XOR B)

Final Borrow-Out

The direct-borrow and Borrow-In terms are ORed together.

Bout = Term1 OR Term2

Full Subtractor vs Half Subtractor

Feature Half Subtractor Full Subtractor
A input Yes Yes
B input Yes Yes
Borrow-In No Yes
Total inputs 2 3
Difference Yes Yes
Borrow-Out Yes Yes
Can process previous borrow No Yes
Multi-bit subtraction stages Limited Suitable

Full Subtractor Using Two Half Subtractors

A full subtractor can conceptually be constructed using two half subtractors and an OR gate.

Half Subtractor 1:
A − B
→ Difference D1
→ Borrow B1

Half Subtractor 2:
D1 − Bin
→ Final Difference
→ Borrow B2

Final Borrow-Out:
Bout = B1 OR B2

Full Subtractors in Multi-Bit Binary Subtraction

For wider binary values, full subtractor stages can be chained. The Borrow-Out of a lower-order stage becomes the Borrow-In of the next more significant stage.

FS0: A0 − B0 − Bin0 → D0 + Bout1

FS1: A1 − B1 − Bout1 → D1 + Bout2

FS2: A2 − B2 − Bout2 → D2 + Bout3

FS3: A3 − B3 − Bout3 → D3 + Bout4

Full Adder vs Full Subtractor

Feature Full Adder Full Subtractor
Main operation Addition Subtraction
Third input Carry-In Borrow-In
Main output Sum Difference
Secondary output Carry-Out Borrow-Out
Primary XOR equation A XOR B XOR Cin A XOR B XOR Bin
Used in Multi-bit addition Multi-bit subtraction

Important Full Subtractor Notes

Important: a full subtractor accepts exactly three one-bit inputs: A, B and Borrow-In.

Its Difference output is calculated as A XOR B XOR Bin.

Borrow-Out indicates that the current stage requires value from the next more significant binary position.

For A = 0, B = 1 and Bin = 1, Difference is 0 and Borrow-Out is 1.

The mathematical value shown in the calculator is useful for explaining the logic condition; the Difference and Borrow-Out together are the actual full-subtractor outputs.

Related BinaryCon Tools

Full Subtractor Calculator FAQs

What is a full subtractor?
A full subtractor is a combinational digital circuit that subtracts two binary operand bits while also processing an incoming borrow.
How many inputs does a full subtractor have?
It has three one-bit inputs: A, B and Borrow-In.
How many outputs does a full subtractor have?
It has two outputs: Difference and Borrow-Out.
What is the full subtractor Difference formula?
Difference equals A XOR B XOR Borrow-In.
What is the Borrow-Out formula?
One common form is NOT(A) AND B OR Borrow-In AND NOT(A XOR B).
What does Borrow-In mean?
Borrow-In indicates that a less significant subtraction stage has already borrowed from the current position.
What does Borrow-Out mean?
Borrow-Out indicates that this stage needs to borrow from the next more significant position.
What happens when A = 0, B = 1 and Bin = 1?
Difference is 0 and Borrow-Out is 1.
What happens when A = 1, B = 0 and Bin = 1?
The subtraction equals zero, so Difference is 0 and Borrow-Out is 0.
What is the difference between a half subtractor and full subtractor?
A half subtractor has only A and B inputs, while a full subtractor also accepts Borrow-In from a previous stage.
Can full subtractors be connected together?
Yes. Borrow-Out from one stage can become Borrow-In for the next more significant stage, allowing multi-bit subtraction.
Can a full subtractor be built from two half subtractors?
Conceptually yes. Two half subtractors can calculate the intermediate and final differences, while their borrow outputs are combined with OR logic.
Is a full subtractor a combinational circuit?
Yes. Its outputs depend only on the current A, B and Borrow-In inputs.
Scroll to Top