Skip to main content

Half subtractor

A half subtractor is a combinational logic circuit that subtracts one binary bit from another and produces two outputs: difference and borrow. In Intro to Electrical Engineering, it is a basic building block for digital subtraction circuits.

Last updated July 2026•Fiveable Content Team

What is the half subtractor?

A half subtractor is the simplest digital circuit that subtracts two 1-bit binary inputs, usually called A and B. It gives you two outputs: the difference, which is the binary result of A minus B, and the borrow, which tells you when the subtraction needs to borrow from the next higher bit.

For the usual input order, A is the minuend and B is the subtrahend. That means you are thinking, "what is A - B?" If A = 1 and B = 0, the difference is 1 and no borrow is needed. If A = 0 and B = 1, the result becomes negative in a single-bit system, so the circuit signals a borrow and gives a difference of 1 for that bit position, which matches binary subtraction rules.

The truth table is the fastest way to see how it works. The four input cases are 00, 01, 10, and 11. The difference output behaves like XOR, because it is 1 when the bits are different. The borrow output behaves like A'B, meaning a borrow happens only when A is 0 and B is 1.

That logic is why the half subtractor is built from simple gates, usually an XOR gate for difference and an AND-based borrow path with inversion on A. In circuit diagrams, you will often draw the two inputs feeding separate logic paths, then label the outputs Difference and Borrow. The point is not just to memorize the table, but to see how binary subtraction can be turned into gate-level logic.

In Intro to Electrical Engineering, this term sits inside digital logic and arithmetic circuits. It is one of those small modules that later gets combined into larger subtractors, multi-bit arithmetic units, and processor-style datapaths. Once you understand the half subtractor, the next step is seeing how borrow chains move across bits in bigger subtraction circuits.

Why the half subtractor matters in Intro to Electrical Engineering

Half subtractors show how arithmetic becomes hardware. In Intro to Electrical Engineering, that matters because digital circuits do not "do math" the way you do on paper, they convert arithmetic into gate networks with fixed input-output behavior.

This term also gives you a clean example of how truth tables, Boolean expressions, and logic gates connect. If you can read a half subtractor table and match it to XOR and AND logic, you are practicing the same kind of thinking you will use for adders, multiplexers, and more complex combinational circuits.

It matters again when the course moves into larger arithmetic blocks. A full subtractor and multi-bit subtractor are built by linking simpler subtraction stages together so that borrow can move from one bit position to the next. That is the same design idea behind many digital systems: start with a small circuit, then chain it into something that handles real numbers.

You will also see this term when the class talks about design tradeoffs. A simple subtractor is easy to build, but as the bit width grows, delay and borrow propagation start to matter. That connects half subtractors to timing, propagation delay, and the limits of simple combinational designs.

Keep studying Intro to Electrical Engineering Unit 15

Official unit cheatsheet

open one-pager

How the half subtractor connects across the course

Full Subtractor

A full subtractor extends the half subtractor by adding a borrow-in input from a lower bit position. That makes it useful for multi-bit subtraction, where each stage has to account for a borrow coming from the previous stage. If you only have A and B, you are looking at a half subtractor. If borrow-in is included, you have the next step up.

half adder

A half adder is the close sibling of a half subtractor. Both circuits use two inputs and produce two outputs, but the meanings change: the half adder gives sum and carry, while the half subtractor gives difference and borrow. They are often taught together because the gate logic looks similar, especially the way XOR shows up in both.

Logic Gates

A half subtractor is built from logic gates, not from arithmetic symbols. The difference output comes from XOR behavior, and the borrow output comes from a gate arrangement that detects when A is smaller than B. This makes the half subtractor a strong example of how Boolean logic turns into an actual circuit diagram.

Binary Arithmetic

Binary arithmetic is the bigger topic that the half subtractor belongs to. Instead of subtracting decimal digits, you are subtracting bits, where the borrow rule is stricter because each position can only be 0 or 1. Understanding the half subtractor helps you see why larger binary subtraction circuits need chained borrow handling.

Is the half subtractor on the Intro to Electrical Engineering exam?

A quiz problem usually gives you a pair of binary inputs and asks for the difference, the borrow, or the truth table row that matches them. You might also be asked to identify the correct logic expression or pick the gate diagram that implements a half subtractor. The quickest move is to check whether A is at least B. If it is, the borrow is 0. If A is 0 and B is 1, the borrow is 1 and the difference bit is 1.

If the problem asks you to compare circuits, make sure you do not confuse a half subtractor with a half adder. One produces difference and borrow, the other produces sum and carry. In a lab or homework set, you may also be asked to sketch the truth table or trace how XOR and AND-based logic produce the outputs.

The half subtractor vs half adder

These two circuits are easy to mix up because they both use two 1-bit inputs and produce two outputs. The half adder adds bits and gives sum and carry, while the half subtractor subtracts bits and gives difference and borrow. If the prompt mentions subtraction or borrowing, you want the half subtractor.

Key things to remember about the half subtractor

  • A half subtractor subtracts two single binary bits and produces a difference output plus a borrow output.

  • The difference behaves like XOR, while the borrow tells you when A is smaller than B.

  • This circuit is a basic building block for fuller subtraction circuits that handle more than one bit.

  • In Intro to Electrical Engineering, it is a gate-level example of how binary arithmetic becomes hardware.

  • If you can read its truth table, you can usually trace the logic diagram too.

Frequently asked questions about the half subtractor

What is a half subtractor in Intro to Electrical Engineering?

A half subtractor is a combinational logic circuit that subtracts one binary bit from another. It has two inputs, A and B, and two outputs, difference and borrow. In this course, it shows how subtraction can be built from logic gates instead of handled as a math symbol.

How does a half subtractor work?

It checks the two input bits and outputs the result of A minus B for that bit position. The difference output is 1 when the inputs are different, and the borrow output becomes 1 only when A is 0 and B is 1. That borrow tells you the circuit would need help from the next bit position.

What is the difference between a half subtractor and a half adder?

A half adder adds two bits and outputs sum and carry. A half subtractor subtracts two bits and outputs difference and borrow. They look similar in block diagrams, but the meaning of the second output is totally different.

Why does a half subtractor use XOR and AND logic?

XOR fits the difference output because subtraction of two single bits gives 1 when the bits do not match. The borrow path is built from logic that detects when A is 0 and B is 1. That gate-level setup makes the circuit easy to combine into larger subtractors.