Half subtractor

Comprehensive study notes, diagrams, and exam preparation for Half subtractor.

Half Subtractor

Definition

A half subtractor is a combinational logic circuit that subtracts one binary digit from another and generates two outputs:

Difference (D)

  • : the result of the subtraction

Borrow (B)

  • : an output indicating whether a borrow is needed from the next higher bit

It accepts two input bits:

Minuend (A)

  • : the number from which another number is subtracted

Subtrahend (B)

  • : the number being subtracted

The half subtractor performs the operation:

Difference = A ⊕ B

Borrow = A' · B

where:

  • denotes XOR

'

  • denotes NOT (complement)

·

  • denotes AND

Main Content

1. Inputs and Outputs of Half Subtractor

  • The half subtractor has two binary inputs, usually named A and B, where:
  • A is the minuend
  • B is the subtrahend
  • It produces two outputs:
  • Difference (D), which is the binary result after subtraction
  • Borrow (Borrow out), which indicates whether subtraction required borrowing from the next higher bit
  • Since it works only on one-bit subtraction, it cannot accept a previous borrow input. This is the main limitation that distinguishes it from a full subtractor.

Truth table of half subtractor

A B Difference (D) Borrow (Bout)
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0

Explanation of each case:

0 − 0 = 0

  • , no borrow

0 − 1 = 1

  • with borrow, because 0 cannot subtract 1 directly

1 − 0 = 1

  • , no borrow

1 − 1 = 0

  • , no borrow

This truth table is the foundation for deriving the logic expressions and implementing the circuit.

2. Logic Expressions and Boolean Derivation

  • The difference output is obtained using the XOR gate:
  • D = A ⊕ B
  • XOR gives 1 only when the inputs are different, which matches subtraction behavior for one-bit values
  • The borrow output is obtained using NOT and AND:
  • Borrow = A' · B
  • Borrow occurs only when A = 0 and B = 1, meaning the minuend is smaller than the subtrahend
  • These expressions can be derived directly from the truth table using Boolean algebra or Karnaugh maps

Why XOR for Difference?

  • If both bits are equal, the result is 0
  • If they are different, the result is 1
  • This exactly matches the subtraction result for 1-bit binary arithmetic

Why A'·B for Borrow?

  • Borrow is needed only when:
  • the minuend bit A is 0
  • the subtrahend bit B is 1
  • That condition is represented by A' AND B

This makes the half subtractor very simple and efficient in hardware design.

3. Circuit Implementation and Symbolic Representation

  • A half subtractor can be implemented using:
  • 1 XOR gate for Difference
  • 1 NOT gate and 1 AND gate for Borrow
  • The logic circuit is compact and low-cost, making it useful in basic arithmetic designs

Functional arrangement:

A ─────┬───────────┐
       │           │
       │         ┌─▼─┐
       │         │XOR│─── Difference
       │         └─▲─┘
       │           │
B ─────┼───────────┘

A ──► NOT ──┐
            ├──► AND ─── Borrow
B ──────────┘

Interpretation of the circuit:

  • The XOR gate compares the two bits and produces the difference
  • The NOT gate inverts A
  • The AND gate combines A' and B to produce the borrow

Symbolic view:

  • Input: A, B
  • Output: D, Borrow

This simple structure makes the half subtractor an important introductory circuit in digital logic design.


Working / Process

1. Apply the two binary inputs

  • Give the minuend bit A and subtrahend bit B to the circuit
  • The circuit evaluates both inputs simultaneously because it is a combinational circuit

2. Generate the difference output

  • The XOR gate checks whether the input bits are the same or different
  • If they are the same, the result is 0
  • If they are different, the result is 1
  • This becomes the Difference output

3. Generate the borrow output

  • The NOT gate first complements A
  • The AND gate then checks whether A is 0 and B is 1
  • If that condition is true, the circuit outputs Borrow = 1
  • Otherwise, borrow remains 0

Example 1: A = 0, B = 1

  • Difference = 0 ⊕ 1 = 1
  • Borrow = 0' · 1 = 1
  • Final output: D = 1, Borrow = 1

Example 2: A = 1, B = 0

  • Difference = 1 ⊕ 0 = 1
  • Borrow = 1' · 0 = 0
  • Final output: D = 1, Borrow = 0

This process shows how the half subtractor performs subtraction for one-bit binary numbers instantly through logic gates.


Advantages / Applications

Simple and easy to implement

  • The half subtractor uses only a few basic logic gates, so it is easy to design and understand

Useful for learning binary arithmetic

  • It helps students understand the relationship between binary subtraction, borrow, and logic gate operations

Foundation for larger subtractor circuits

  • Half subtractors are used as building blocks in the construction of full subtractors and multi-bit binary subtraction circuits

Summary

  • A half subtractor is a combinational circuit that subtracts one binary bit from another
  • It produces two outputs: difference and borrow
  • The difference is generated using XOR, and the borrow is generated using NOT and AND

Important terms to remember

  • Minuend
  • Subtrahend
  • Difference
  • Borrow
  • XOR gate
  • AND gate
  • NOT gate