# 4-bit Adder-Subtractor In Digital Circuit

Addition and subtraction operation is the fundamental operation performed in arithmetic and logical unit of CPU. Adder-subtractor circuit is the logic circuit which performs both addition and subtraction operation using n-bit adder circuit.

The adder-subtractor circuit performs respective operation based on the input signal called A/S which is add/subtract. When A/S signal is logic 0, it performs addition operation and when it is logic 1, it performs subtraction operation of two n-bit number.

We know that we can add two number using adder circuit. Let's consider a two n-bit number A and B and the addtion S of these two number is $$S = A + B$$ For performing above operation, n-bit adder is required. If we want to subtract using adder we can perform the operation $$S = A + (-B)$$ If we use negative number, we can perform subtration operation. In binary number, we can make positive number to negative by doing it's 2's complement operation.

In 2's complement first we make number complement of original number and we add binary 1 in it. So, $$-B = \overline B + 1$$ Hence subtraction operation becomes. $$A - B \text{ (is equivalent to) } = A + \overline B + 1$$

## Circuit Diagram

The circuit diagram of 4-bit adder-subtractor is given below.