Hi, I need to design a circuit that adds two 4 bit numbers that are positive/positive, positive/negative, and negative/negative in two's compliment format. The range is -7 to 8. I have set up a table matching the binary representation of each input. Now what? I have been hinted that I would need to use XOR gates.
Are you sure that the range is -7 to 8? If so, then the representation is not 2's compliment, which has values from -8 to 7. Have you done anything with unsigned adders? With full-adders? With half-adders?
So what background in digital logic do you have? We need a feel for this so that we don't end up throowing a bunch of terminology and concepts at you that you haven't been exposed to, yet. Most courses don't through 4-bit adder design problems at students until they have been exposed to 1-bit adder designs. Also, if you are going to design signed adders it is important that you have a firm understanding of signed binary arithmetic. Do you?
I've designed circuits that convert binary to excess 3, postnet to binary, and binary to Roman numerals using truth tables, Boolean algebra equations and Karnaugh maps to simplify them allowing me to use less OR/AND gates than I have to. I have been exposed to the very basics of half adders and full adders showing their truth tables for 2 inputs and what kind of carry in/carry out is displayed. I've also seen the equations for the truth tables. What I meant by I have no experience is that I have no experience designing a circuit with adders. I know how to convert positive to negative in two's compliment. I just invert the bits and add 1. So in a 4 bit system -1 would be 1111. I do know how to add binary numbers by hand. I also know how to subtract but the method I know is really just adding negative numbers.
Okay, that helps a lot. So let's start with a bunch of full adders as our buiding blocks. If you understand how and what a full adder does in terms of adding two bits together and dealing with a carry-in and a carry-out (and what each of those mean in terms of addition), then first try to construct a 4-bit adder that only has to work with unsigned binary values (often called 'straight' binary). Once you have that, we can see how some very minor tweaks will make it perform subtration and work with 2's complement.