Wednesday 20 March 2013

4 bit Adder/Subtractor Circuit


Basic Theory:

It is possible to make a logical circuit that can do both addition and subtraction based on the mode selection concept. In case of a four bit adder-subtractor, two four bit binary numbers are added or subtracted on the basis of the operation mode. The main principle behind it is subtraction using the two’s complement method. 

The expression for this is:
Dn = A - B = A + B’ +1.

This kind of circuit is a ripple-carry adder circuit along with some additional XOR gates to add the subtraction functionality. It works as a full adder if the selected mode is 0 “zero”, and works as a full subtractor if the mode is selected as 1 “one”. The logic diagram can be seen below.

Circuit Diagram:


Observed Values:
Following set of values were obtained in observation.
For addition,
1.      0011 + 0100 = 0111
2.      1101 + 0001 = 1110
3.      1101 + 0010 = 1111
4.      0010 + 0010 = 0100
5.      1000 + 1000 = 0000; Cout = 1

For subtraction,
1.      1011 – 1100 = 1111
2.      1010 – 0101 = 0101
3.      1111 – 1101 = 0010
4.      0011 – 0011 = 0000
5.      1000 – 0100 = 0100

Reference:
Wikipedia (2013), Adder-subtractor, Accessed: February 12, 2013, Retrieved from: http://en.wikipedia.org/wiki/Adder%E2%80%93subtractor

No comments:

Post a Comment

Was this post helpful? Ask any questions you have, I will try to answer them for you.