2
\$\begingroup\$

With the following scheme, I built myself a 3-bit full adder. What I'm wondering is, and I couldn't figure this out myself, does the adder calculate with signed or unsigned values?

  • Is the range for the 3-bit adder between (-4) and 3, or is it between 0 and 7?

  • Alternatively, is it whatever. As in, can I choose whether I want the binary number 111 to represent (-1) or if I want it to represent 7?

The adder of course can make both addition and subtraction. The scheme I took came from here. The site has a scheme with overflow and subtraction/addition added to the scheme.

The site claims: "When is the result negative? When its most-significant bit is 1. " But I'm still not sure if that must be the ABSOLUTE truth. I'm thinking the range (-4) and 3 is necessary to calculate with subtraction. Am I correct?

enter image description here


Answer to my problem. The main reason we use 2s complement is in fact the advantage that we can display unsigned and signed integers on the same circuitry.

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ By the wa.y, you should self-answer your question by posting a separate answer. Answers don’t belong in questions. And yes, it’s fine and encouraged to self-answer if you find a solution yourself. \$\endgroup\$ Commented Nov 8, 2022 at 22:50

1 Answer 1

3
\$\begingroup\$

Yes, it can be either. It will work with unsigned 3-bit numbers. It will also work with 2s complement signed numbers. You'll need to do a bit of study, but the thing to remember with 2s complement is that a 0 sign bit means positive, and a 1 means negative.

\$\endgroup\$
1
  • \$\begingroup\$ Sorry to bother you. Found a good source that explained what I was wondering. I attached an explanation to future viewers of this thread. Thank you for your help :) \$\endgroup\$
    – B. Lee
    Commented Feb 17, 2015 at 2:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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