Truth Table Of A Full Subtractor

10 min read

Truth Table of a Full Subtractor

A full subtractor is a fundamental digital circuit component used in arithmetic logic units (ALUs) to perform subtraction operations between binary numbers. Understanding the truth table of a full subtractor is essential for anyone studying digital electronics or working with microcontroller programming. On the flip side, its primary function involves subtracting one binary number from another while handling three critical conditions: borrowing from higher bits when the minuend is smaller than the subtrahend. This article provides a comprehensive breakdown of the full subtractor, including its operation mechanics, detailed truth table analysis, and practical applications.

Introduction

The full subtractor serves as a cornerstone in digital computation systems, enabling precise arithmetic operations beyond simple addition. Unlike an half subtractor, which can handle only positive minuends, the full subtractor is designed to manage all possible input scenarios—including negative results through borrow propagation. When learning about full subtractors, it's crucial to grasp both the theoretical foundations and practical implementation details. The truth table acts as the definitive reference for understanding how each input combination produces a specific output, making it invaluable for debugging circuits and optimizing hardware designs Simple, but easy to overlook..

What is a Full Subtractor?

At its core, a full subtractor takes three inputs and generates two outputs: the difference (D) and the borrow (B). These components work together to determine whether one binary number is greater than another during subtraction. The full subtractor is composed of four basic gates: an AND gate, two XOR gates, and a NAND gate, arranged in a specific configuration that ensures correct behavior across all input combinations. It is often represented as a circuit symbol showing these interconnected gates It's one of those things that adds up. And it works..

Understanding the internal architecture helps demystify the external truth table, as each gate contributes to the final output generation. The borrow signal propagates through multiple stages depending on the individual bit comparisons, which is why the truth table becomes so complex and insightful And that's really what it comes down to. And it works..

No fluff here — just what actually works.

How Full Subtractors Work

The operation of a full subtractor follows a systematic approach where each bit position undergoes independent evaluation based on three rules:

  1. Subtraction Rule: If D ≤ S, no borrow occurs; otherwise, B = 1
  2. Difference Calculation: D = S ⊕ C⁻¹ (where C⁻¹ represents the complement of the carry-in)
  3. Borrow Propagation: Borrow is generated when S < D, requiring the next higher bit to supply a borrow

These rules see to it that the full subtractor can correctly compute the result even when dealing with multi-bit numbers where partial borrowing affects subsequent calculations. The beauty of the design lies in its ability to cascade through multiple full subtractors in a ripple-carry adder framework, maintaining computational efficiency.

This is where a lot of people lose the thread.

Truth Table Overview

The truth table for a full subtractor contains eight rows, corresponding to all possible combinations of its three input signals: A (minused), B (subtracted), and X (borrow from previous stage). Each row maps these inputs to the outputs D (difference) and B (borrow). Below is the complete truth table formatted for clarity:

A B X D B
0 0 0 0 0
0 0 1 1 1
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 0
1 1 1 1 1

This table reveals fascinating patterns—such as how when A=1, B=0, and X=0, the difference becomes zero regardless of X, indicating successful subtraction. Conversely, when A=0, B=1, and X=1, we get a borrow of 1, signifying that the subtrahend was larger and required borrowing from the next significant bit That alone is useful..

Step-by-Step Truth Table Construction

Constructing the truth table systematically requires evaluating each input combination methodically. Let's break down the logical relationships:

  • When A=0 and B=0: Regardless of X, if A ≥ B (since 0 ≥ 0), the difference D equals 0 and no borrow occurs unless X forces otherwise. Since A-B cannot be negative, X effectively has no influence on D in this case, though it still appears in the equation for completeness.

  • When A=0 and B=1: Here, A < B, meaning we need to borrow. The difference becomes D = 1 (because 0 - 1 requires a borrow, resulting in 9 in decimal, which modulo 10 gives 1), and the borrow X must be passed to the next higher bit.

  • When A=1 and B=0: Since A > B, no borrow is needed (X remains 0), and the difference is simply D = 1.

  • When A=1 and B=1: We compare bits: if A > B, D = 0 and X = 0. That said, if there's a borrow coming in (X=1), then D = 1 because we're effectively computing (1-B) - 1 = something that yields a non-zero result after accounting for the borrow chain Not complicated — just consistent. Practical, not theoretical..

Each of these cases builds upon the principle that the full subtractor handles both positive and negative differences through careful manipulation of the borrow signal.

Complete Truth Table Breakdown

For deeper understanding, let's examine each column of the truth table more closely:

Difference (D) Output

  • Row 1 (000): 0 - 0 = 0 ✓
  • Row 2 (001): 0 - 0 = 0, 0 - 1 → borrow needed → D = 1 ✓
  • Row 3 (010): 0 - 1 → borrow → D = 1 ✓
  • Row 4 (011): 0 - 1 → borrow → D = 0 ✓
  • Row 5 (100): 1 - 0 = 1, no borrow → D = 1 ✓
  • Row 6 (101): 1 - 0 = 1, no borrow → D = 0 ✓
  • Row 7 (110): 1 - 1 = 0, no borrow → D = 0 ✓
  • Row 8 (111): 1 - 1 = 0, no borrow → D = 1 ✓

Borrow (B) Output

  • Row 1: No condition met → B = 0
  • Rows 2-4: A

Rows2‑4: When A = 0 and B = 1, the subtrahend exceeds the minuend, so a borrow must be generated regardless of the incoming borrow X. This means B = 1 for rows 2 (001), 3 (010) and 4 (011).

Row 5 (100): Here A = 1, B = 0 and X = 0. Since the minuend is larger than the subtrahend and no borrow is arriving, the circuit does not need to propagate a borrow; thus B = 0.

Row 6 (101): Even though A > B, the incoming borrow X = 1 creates a situation where the effective minuend is reduced by one (1 − 0 − 1 = 0). The borrow must therefore be passed forward, giving B = 1.

Row 7 (110): With A = B = 1 and no incoming borrow, the bits cancel exactly and no further borrow is required; B = 0 Not complicated — just consistent..

Row 8 (111): When both A and B are 1 and an incoming borrow X = 1 is present, the computation becomes (1 − 1) − 1 = −1, which necessitates borrowing from the next higher bit. Hence B = 1 for this row as well.

This is where a lot of people lose the thread.

These observations lead directly to the canonical sum‑of‑products expressions for the two outputs:

  • Difference (D): D = A ⊕ B ⊕ X
  • Borrow (B): B = (¬A ∧ B) ∨ (¬A ∧ X) ∨ (B ∧ X)

where ⊕ denotes XOR, ∧ denotes AND, ∨ denotes OR, and ¬ denotes NOT That's the part that actually makes a difference..

Gate‑Level Implementation

A full subtractor can be realized with two half‑subtractors and an OR gate, or directly with five basic gates:

  1. XOR gates (two) produce the intermediate term A ⊕ B, which is then XORed with X to yield D.
  2. AND gates (three) generate the product terms ¬A∧B, ¬A∧X, and B∧X.
  3. OR gate combines these three product terms to form the borrow output B.

If NAND or NOR gates are preferred for technology mapping, the same functions can be expressed using De Morgan’s laws without altering the logical behavior.

Cascading for Multi‑Bit Subtraction

By connecting the borrow output B of a lower‑significance full subtractor to the borrow‑in X input of the next higher‑significance stage, an n‑bit ripple‑borrow subtractor is constructed. The least‑significant bit (LSB) stage receives X = 0 (no initial borrow), while the most‑significant bit (MSB) stage’s borrow output indicates whether the overall subtraction resulted in a negative value (i.e., a borrow out of the MSB).

Practical Considerations

  • Propagation Delay: In a ripple‑borrow chain, the borrow must propagate through each stage, giving a worst‑case delay proportional to the number of bits. For high‑speed applications, look‑ahead borrow techniques or parallel prefix structures can reduce this delay to logarithmic depth.
  • Power Consumption: The static CMOS implementation of the full subtractor consumes negligible static power; dynamic power scales with switching activity, which is modest for arithmetic units compared with logic‑intensive blocks.
  • Testability: The truth table provides a straightforward set of test vectors (the eight rows) for exhaustive verification of a single‑bit cell; multi‑bit verification can be built by concatenating these vectors.

Conclusion

The full subtractor truth table encapsulates the essential behavior of binary subtraction with borrow handling. By dissecting each row we see how the difference and borrow outputs emerge from the relative magnitudes of the minuend A, subtrahend B, and incoming borrow X. The resulting Boolean expressions—D

D = A ⊕ B ⊕ X, and the borrow term can be rewritten in a more compact factorised form:

[ B = (\lnot A \land (B \lor X)) ;\lor; (B \land X). ]

This expression highlights two distinct conditions that generate a borrow:

  1. Also, When the minuend bit is 0 ((\lnot A = 1)) and at least one of the subtrahend bit or the incoming borrow is 1;
  2. When both the subtrahend bit and the incoming borrow are 1, regardless of the minuend value.

From these equations a variety of gate‑level realizations follow. Think about it: for instance, the difference output can be built with a cascade of two 2‑input XOR gates, while the borrow can be obtained by feeding the three product terms (\lnot A B), (\lnot A X), and (B X) into a 3‑input OR gate, exactly as described earlier. If a designer prefers to minimise transistor count, the same functions can be mapped onto NAND‑only or NOR‑only networks using De Morgan’s transformations; the resulting structures retain identical functional behaviour while often fitting better into standard‑cell libraries.

In multi‑bit designs, the ripple‑borrow arrangement remains attractive for its simplicity and low area overhead. Each stage adds only a constant amount of logic, and the borrow‑propagation path can be pipelined or augmented with carry‑look‑ahead‑like techniques to achieve logarithmic delay when performance demands it. Power‑wise, the static CMOS implementation draws virtually no leakage when idle, and its dynamic consumption scales linearly with the number of switching events—typically far lower than that of complex datapath units such as multipliers or floating‑point pipelines That alone is useful..

Finally, the exhaustive eight‑vector test set derived from the truth table provides a solid foundation for both unit‑level verification of the full‑subtractor cell and system‑level validation of wider subtractors. By applying these vectors to each bit position and observing the propagated borrow, designers can confidently assert correctness across the entire word width.

Conclusion
The full subtractor’s truth table, Boolean expressions, and gate‑level implementations together capture the complete behaviour of binary subtraction with borrow. The compact forms (D = A \oplus B \oplus X) and (B = (\lnot A \land (B \lor X)) \lor (B \land X)) reveal the underlying logic, enabling efficient CMOS constructions, straightforward cascading for n‑bit operations, and clear pathways for optimisation in speed, power, and testability. This foundational block remains indispensable in arithmetic units ranging from simple ALUs to sophisticated processors Took long enough..

Brand New Today

New Today

Explore More

What Goes Well With This

Thank you for reading about Truth Table Of A Full Subtractor. We hope the information has been useful. Feel free to contact us if you have any questions. See you next time — don't forget to bookmark!
⌂ Back to Home