Creating a subtractor with logic gates

Martin McBride
5 min readMar 15, 2024

We previously saw how to add two binary numbers using logic gates. In that article, we developed a simple circuit to add two binary bits, with carry-in and carry-out bits. We also saw how to combine multiple single-bit adders to create a circuit that can add binary numbers together.

In this article, we will extend that to cover subtraction too. This is easier than you might expect. We will also look at how to make a single circuit that can perform addition, subtraction, and negation.

Binary subtraction

--

--