# Half Subtractor:-

The half subtractor is also a building block for subtracting two binary numbers. It has two inputs and two outputs. This circuit is used to subtract two single bit binary numbers A and B. The **'diff**' and **'borrow'** are two output states of the half subtractor.

### Block diagram:-

### Truth Table:-

The SOP form of the **Diff** and **Borrow** is as follows:

Diff= A'B+AB'

Borrow = A'B

### Diagram:-

*formed using simulator provided.

# Full Subtractor:-

The Half Subtractor is used to subtract only two numbers. To overcome this problem, a full subtractor was designed. The full subtractor is used to subtract three numbers A, B, and C, which are minuend, subtrahend, and borrow, respectively. The full subtractor has three input states and two output states i.e., diff and borrow.

### Block diagram:-

### Truth Table:-

The SOP form can be obtained with the help of K-map as:-

**Diff=xy' z'+x' y' z+xyz+x'yz'**

**Borrow=x' z+x' y+yz**

### Diagram:-

*formed using simulator provided.