 Last time we built this 32-bed adder and it worked well, but it did take a while to walk through So we'd rather not go through that whole process again if we don't have to So let's consider for a moment what subtraction is. What do I want to do if I want to calculate say? a minus B. Is there some other way I can express this which is logically equivalent to a minus p But which might just say use my addition hardware instead Well, I could potentially do a plus negative b Then I'd be doing an addition operation and I already have the hardware for addition But I'd need this negative b thing. How would I get a negative b then? Well, since we're representing all of our numbers in 32 bits using the two's complement format All we have to do is apply the two's complement operation to our Input and then we'd have a negative b So our two's complement operation says flip all of the bits and add one So we want to do negative b. So we'd have to find all of these b's Invert them and then we need to add one more to this thing So I'm going to extend this a little bit I need a way to pass it and say negative and b The way I can do that is by adding in a not gate But since I'd rather not waste the gates and produce say Two different adders one which does addition the other does subtraction and then choose the results of them I'm actually going to choose whether I do addition or subtraction just by choosing whether I pass in b or negative b So I'm going to add in some multiplexers Then on one of these I'll want b on the other side. I will have a not b So I'll just put a not gate in front of all of the one labeled want So now I have a set of multiplexers, which will allow me to choose between say b and not b And I'm going to want all of those Conditioned on the same Selector bit I will name this one b invert because it inverts b And I will just connect it all the various Be multiplexers that we've got there So if I set b invert to zero, then we just pass b through and we get our addition as normal But if I want to do subtraction Then I'd invert b. So I'd set the b invert line to one Then it would select all of those not bees, but then I also need to add in one so I flip all the bits and be and then This carry in line. So I'd set that to one Now I'd be adding one more. So I'd invert all of my bits and add one So I'd get the two's complement of b So now I'd have negative b and I can just do my addition as normal So internally we'll just doing the same one bit addition we did before So everything else is going to stay the same. We're still using our one bit adders They're still all connected the same way as they were before But now we can choose whether we want to do addition or subtraction Thanks to these handful of multiplexers