# About Logic Gates, Half Adder, Half Subtractor

Discussion in 'Homework Help' started by MynameisReo, Nov 17, 2014.

1. ### MynameisReo Thread Starter New Member

Nov 17, 2014
2
0
Hi to everyone.

I would like to ask a question about half adder/half subtractor. I have a,b inputs and x control input. Outputs are sum and carry. I know how to draw half adder/half subtractor circuit diagram. However, there is a question: " Design an one bit half adder/subtractor circuit. There are a,b inputs and also x control input. Sum(S) and Carry(C) are outputs. I need to ADD operation for x=1 and SUBTRACTION operation for x=0.

Please, could you tell me how I can create the circuit. I have not understood that if I have 3 inputs then can I use half adder ? (If I create logic table, this looks like full adder circuit.)

Thanks for any help.

2. ### Brownout Well-Known Member

Jan 10, 2012
2,375
998
Have you tried using a Karnaugh map?

3. ### MynameisReo Thread Starter New Member

Nov 17, 2014
2
0
Yes. After I create logic table, I got sum and carry values which are 1. Then, I simplified the equation on Karnaugh map. It was like full adder equation.

4. ### WBahn Moderator

Mar 31, 2012
18,087
4,917
Just because you have three inputs does not make it a full adder. In a full adder, the circuit is treating each input as a 1-bit value and is adding up all three values. This is NOT what you have been asked to do. You have been asked to either add two 1-bit values or subtract a 1-bit value from another 1-bit value. The third input is NOT a value that is being combined with the other two inputs, it is a control input that is merely determining whether the circuit will add the other two, or subtract.

Until you show us the truth table you've come up with, there is no way for us to tell whether you have done it correctly or not.

5. ### Brownout Well-Known Member

Jan 10, 2012
2,375
998
Half adder has a carry out. Full adder has a carry in, which the half adder does not have.