Adders and Subtractors


Adders and Subtractors are the arithmetic combinational logic circuits. They are used for doing arithmetic operations. We have various types of adders and subtractors all with some specific functions. This article talks about them.
 

Half Adder

A half adder is an arithmetic combinational logic circuit that adds two 1-bit inputs to give the sum and the carry generated as the output.

The half adder circuit adds two single bits and ignores any carry if generated. Since any addition where a carry is present isn’t complete without adding the carry, the operation is not complete. Hence the circuit is known as a half-adder. 

Truth Table



From the truth table above, SUM=1 if A=0, B=1 or if A=1,B=0. Therefore,
SUM = A'B + AB' =  A⊕B
Similarly, CARRY is 1 iff A=1, B=1. Therefore,
CARRY = AB

Logic Circuit

From the equations of SUM and CARRY we can easily state that the half adder circuit includes an XOR gate and an AND gate. So, the logic circuit for half adder is :

Full Adder

A combinational circuit that performs addition of three bits (two significant bits and a previous carry) is called a full adder. Two half adder can be used to implement a full adder.  The only difference between a full adder and a half adder is the difference in the number of input bits. We also have to consider the carry bit in the full adder,i.e., we have three inputs instead of two.

Truth Table

Here is the truth table of a full adder:


We can solve the output function using K-Map, which will result in the following equations:

SUM = A'B'Y+A'BY'+ABY+AB'Y' = Y(A'B'+AB) + Y'(A'B+AB') = YX'+Y'X = Y⊕X = A⊕B⊕Y
And, CARRY = AB+BY+AY = Y(A+B) + AB

Logic Circuit

From the equations written above of SUM and CARRY, we can design the logic circuit for full adder. We will use two half adders to implement it.

Half Subtractor

Half Subtractor is quite similar to the half adder. Half Subtractor subtracts two 1-bit binary numbers to give two outputs, difference and borrow. It ignores any borrow input and performs only half function of a subtractor. Hence it is known as the half subtractor.

Truth Table

Below we have been provided with the truth table of half subtractor:


We get DIFFERENCE as 1 if A=0, B=1 or A=1, B=0.
Hence, DIFFERENCE = A'B+AB' = A⊕B

Similarly, BORROW is 1 if A=0, B=1. 
Hence, BORROW = A'B

Logic Circuit

In the above equations we saw that DIFFERENCE represents an XOR gate and BORROW represents a NOT gate for one input which is next followed by an AND gate. Hence, the logic circuit for a half subtractor can be designed with these equations.


Full Subtractor

Similar to the full adder, a full subtractor includes the borrow which is ignored by the half subtractor. So, the full adder has three inputs and two outputs. A full subtractor can be implemented using two half subtractors.

Truth Table

Truth table of full subtractor is as given below: 

We can get the equations for DIFFERENCE and BORROW by solving the functions by K-Map, which will provide the result as:

DIFFERENCE = A⊕B⊕Y
And, BORROW = A'D+BD+A'B = A'(B+D)+BD

Logic Circuit

Designing the logic circuit for full subtractor by using the derived equations of DIFFERENCE and BORROW, we get the following circuit:

 
Here Bᵢₙ = the input borrow, D(Truth table)
D = DIFFERENCE
And Bₒᵤₜ = the output borrow, BORROW.

Applications of Adders and Subtractors

  • The most basic function of adders and subtractors is to perform arithmetic operations like addition, subtraction, multiplication and division in digital electronics.
  • Adders and Subtractors are in computer's ALU (Arithmetic Logic Unit) to compute addition as well as CPU (Central Processing Unit) and GPU (Graphics Processing Unit) for graphics applications to reduce the complexity of the circuit.
  • These are also used in micro-controllers for arithmetic operations, program counter and timers.
  • They have their applications in field of networking and digital signal processor oriented system.
  • They are also used to calculate address, tables and similar operations through processors.

Post a Comment

0 Comments