The problem I am having is how to define the rules of the circuit.If the inputs A and B are unsigned, the answer will give A - B if A >= B OR the 2's complement of (B-A) if A < B. In this case, I would have to compare the inputs to see which one is larger and in cases where B is larger than A, take the 2's complement of the answer to show the positive value and turn on a bit to show that it is negative.
If the inputs A and B are signed, the range of values I could use are from 0 - 7 and the result will give signed A - B as long as there is no overflow.
Comments
Leave a comment