๐ข Subtractors
Subtractor circuits are foundational in any complex logic circuit
โ๏ธ Half Subtractor
Borrow
A
- B
-------------
DiffLogic Equations
$\text{Diff} = A \oplus B$
$\text{Borrow} = \overline{A} \cdot B$
โน๏ธ
Notes
- No borrow-in input
- Cannot be chained directly for multi-bit subtraction
- Gate count: 1 XOR, 1 AND, 1 NOT
| A | B | Diff (AโB) | Borrow ($\overline{A} \cdot B$) |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 0 |
| 1 | 1 | 0 | 0 |
More on Adders
๐ง Full Subtractor
Borrow-out Borrow-in
A
- B
------------------------
DiffLogic Equations
$\text{Diff} = A \oplus B \oplus B_{in}$
$B_{out} = B \cdot B_{in} + \overline{A} \cdot (B \oplus B_{in})$
โน๏ธ
Notes
- Can be chained for multi-bit subtraction
- Minimal logic avoids redundancy using XOR
- Exhaustive logic is more intuitive but less gate-efficient
- Gate count (minimal): 2 XOR, 2 AND, 1 OR, 1 NOT
| A | B | Bin | Diff | Bout |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 1 | 1 |
| 0 | 1 | 0 | 1 | 1 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 0 | 1 | 0 | 0 |
| 1 | 1 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 | 1 |
More on Full Subtractors
Last updated on