Login  Register

Re: FullAdder imp.

Posted by WBahn on May 14, 2021; 10:08pm
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/FullAdder-imp-tp4025675p4036007.html

notzy wrote
Thanks for your fast reply. I have to admit that I don't fully understand your explanation, especially this sentence:

WBahn wrote
In no case what there a Carry from either of these operations but in which we wanted the Cout to be anything other than zero.
Can you reformulate that?
Sure. We need to come up with logic that not only gives us a 1 when we need a 1, but also that does NOT give us a 1 when we need a 0.

If there were times that one of the half-adders produced a carries but that we needed the full-adder to produce a 0, then we couldn't use the Or of the carries from the two half-adders as our carry from the full adder.

notzy wrote
WBahn wrote
So the Cout bit is a 1 whenever there is a Carry from EITHER of the two half-add operations.
If this is the conclusion, shouldn't it be a Xor gate instead of Or?
In this case it doesn't matter.

It comes down to what we need to happen when BOTH half-adders produce a carry. It's a non-issue because it can't ever happen. So we don't care what our full-adder's carry would be in that situation and we can choose either an Or or an Xor. Since the Or is the smaller, faster logic (something that doesn't matter for this course), we would opt for it.