I need to plan a circuit that will convert $$-\{Y_3,Y_2,Y_1,Y_0\}$$
To it's two's complement show
$$\{S_3,S_2,S_1,S_0\}$$
I think the question is undefined well since 0 is not unique and since converting a 4 bits negative number to two's complement requires 5 bits and I only have room for 4 bits.
Is there a way to solve this?
Best Answer
A "two's complement" is just a one's complement followed by a increment. For example:
0101 original
1010 one's complement
1011 plus 1
The orginal was 0101, which is 5, and the result is 1011, which is -5 as expected. Put another way, it takes 5 increments to make the result 0.