What is Adder? In electronics, an adder is a digital circuit that performs the addition of numbers. In modern computers, adders reside in the arithmetic logic unit (ALU).
Adders: Adders are important not only in the computer, but also in many types of digital systems in which the numeric data are processed.
Types of adder:
Half adder
Half adder: The half adder accepts two binary digits on its inputs and produce two binary digits outputs, a sum bit and a carry bit.
The half adder is an example of a simple, functional digital circuit built from two logic gates. The half adder adds to one-bit binary numbers (AB). The output is the sum of the two bits (S) and the carry (C).
Note that how the same two inputs are directed to two different gates. The inputs to the XOR gate are also the inputs to the AND gate. The input "wires" to the XOR gate are tied to the input wires of the AND gate; thus, when voltage is applied to the A input of the XOR gate, the A input to the AND gate receives the same voltage.
Full adder
The full adder accepts two inputs bits and an input carry and generates a sum output and an output carry.
The full-adder circuit adds three one-bit binary numbers (Cin, A, B) and outputs two one-bit binary numbers, a sum (S) and a carry (Cout). The full-adder is usually a component in a cascade of adders, which add 8, 16, 32, etc. binary numbers.
If you look closely, you'll see the full adder is simply two half adders joined by an OR.
We can implement a full adder circuit with the help of two half adder circuits. The first half adder will be used to add A and B to produce a partial Sum. The second half adder logic can be used to add CIN to the Sum produced by the first half adder to get the final S output. If any of the half adder logic produces a carry, there will be an output carry. Thus, COUT will be an OR function of the half-adder Carry outputs.
What is Subtractor?
Subtractor is an electronic logic circuit for calculating the difference between two binary numbers which provides the difference and borrow as output.
Types of Subtractor:
Half Subtractor: It is used for subtracting one single bit binary number from another single bit binary number. It has two inputs; Minuend (A) and Subtrahend (B) and two outputs; Difference (D) and Borrow (Bout).
Full Subtractor: A logic Circuit which is used for subtracting three single bit binary numbers is known as Full Subtractor.
It has three inputs; Minuend (A), Subtrahend (B) and following Subtrahend (C) and two outputs; Difference (D) and Borrow (Bout).
Half Subtractor
Full Subtractor