-1
\$\begingroup\$

I am having a hard time trying to implement an adder for 8-bits signed numbers with 1's complement but without using VHDL since I am new to this kind of stuff. But I know that I should use 8 full adders and link them together but the problem is that I don't know how to do it.

It is an assignment and I know you can't give me the full solution of the problem. So I started designing my circuit on an application called "logic circuit".

And this is the interior of a full adder.

enter image description here

I just need some hints to know how to implement my circuit.

\$\endgroup\$
1
\$\begingroup\$

Have you seen this post: https://cs.stackexchange.com/questions/64742/1s-complement-addition-of-outer-carry-to-the-result

It looks like you just perform the standard binary addition, and then the final carry bit is added to the result.

So to implement an 8-bit adder, you'll need 8 single-bit adders. Just drive the Carry-Out result of any bit into the Carry-In of the neighboring bit to the left. The final carry bit is on the left-most carry-out.

The least-significant-bit reduces to a half adder since the input carry is always 0.

\$\endgroup\$
  • \$\begingroup\$ You surely helped me a little bit, so I should have 8 full adders and link the carry out of each adder to the carry in of the other adder. But what about the 2 other inputs?@SittinHawk \$\endgroup\$ – P_M Dec 1 '19 at 8:10
  • \$\begingroup\$ The A and B inputs are the digital bits of the number you are trying to add: A + B = S. If A and B are 8-bit, you would need 8 single bit adders. The algorithm is extremely similar to how you normally do math (in base 10) and digits. Say you are trying to add two numbers that have two digits each (16+15). You take the right most digits and add together: 6+5 = 11. Carry the 1. Go to the next digit 1+1 = 2, but add in 1 for the carry = 31. Binary addition works the same way, except instead of a "digit" you are operating on each "bit" (in fact, it can still be called a digit even when base 2). \$\endgroup\$ – Sittin Hawk Dec 7 '19 at 17:54
  • 1
    \$\begingroup\$ So do that, but for one's complement there is one final step: Once you get your answer, you add the final carry bit back into the answer. So either add zero or add one to the answer. \$\endgroup\$ – Sittin Hawk Dec 7 '19 at 17:56
  • \$\begingroup\$ Is the last image correct? \$\endgroup\$ – P_M Dec 9 '19 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.