We can subtract the 5-bit binary numbers 011012 (1310) and 010012 (910) by converting 010012 to its negative equivalent in 2's complement and adding this value to 011012.

 First, we need to convert 010012 to its negative equivalent in 2's complement. ``` 01101 (13) - 01001 - (9)``` To do this we change all the 1s to 0s and vice versa. ` 01001 -> 10110` Then we add 1 to the number to obtain our negative equivalent. Notice that the most-significant digit is now 1 since the number is negative. ``` 10110 + 1 10111 (-9)``` Next, we add the negative value we computed to 011012. This gives us a result of 1001002. However, since we are only using 5-bit binary numbers, we discard the extra bit on the left side. ``` 01101 (13) + 10111 +(-9) 100100 (?)``` This gives us a final answer of 001002 (or 4). ``` 01101 (13) + 10111 +(-9) 00100 (4)```

Animated version

Let's review the steps for subtracting x from y with an n-bit 2's complement representation.

1. Negate x using 2's complement.
1. Reverse all the bits in x.
2. Add 1 to form -x.