1
\$\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\$
2
\$\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\$
  • \$\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 Feb 17 '15 at 2:30

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.