Discussion in 'Homework Help' started by jupitergirl, Sep 10, 2009.

1. ### jupitergirl Thread Starter New Member

Sep 10, 2009
2
0
ok i need help with this!!! i'm supposed to design a LOGIC circuit so here's the question

Design a 4bit/8bit parallel adder/subtractor circuit that can add 2 no:s using FULL ADDERS or half adders!!
i.e. A+B, A-B, -A+B, -A-B!!!

Last edited: Sep 11, 2009
2. ### jupitergirl Thread Starter New Member

Sep 10, 2009
2
0
what i already know is to do A+B and A-B..... tht is u connect the first carry C0 to the first FA(full adder) n use a XOR gate for input B...

that way if the first carry C0 is zero B remains the same therefore v can do A+B...

n if the carry C0 is 1 then B gets inverted n also +1 is added to the full adder in order to get the 2's complement!!!

3. ### jit26 New Member

Sep 12, 2009
11
0
Hello
use so and s1 to select one of the function a+b, -a+b, a-b,-a-b

use full adder ann set the carry value depending on your operation.
fn i/p a i/p b carry
a+b all a b 0
a-b all a 1's complement of b 1
-a+b 1's complement of a b 1
-a-b 1's complement of a 1's complement of b 1

so you need 5 input Cin,s0,s1,a,b. select combination and logic to give input to full adder.

4. ### jit26 New Member

Sep 12, 2009
11
0
And if you need more help just google ALU