 Classic List Threaded 8 messages Open this post in threaded view
|

 Hi im trying to implement the FuallAdder usind two H.A. when adding the C bit using a H.A. , i conclude that the carry_out is not important so i want to leave it unwired but the Hardware simulator is crying that its the carry output shoul be connected how can i cause it be unconnected? regards
Open this post in threaded view
|

Open this post in threaded view
|

sum2 is the sum output from the full adder. carry1 and carry2 need to be combined in some fashion to produce the full adder's carry output.

--Mark I think you made a typo. Shouldn't you add sum1 and c to get the final sum?

Open this post in threaded view
|

 Administrator pLaQNo1 wrote I think you made a typo. Shouldn't you add sum1 and c to get the final sum? Thanks for catching that. I corrected the original reply. --Mark
Open this post in threaded view
|

 In reply to this post by cadet1620 Hey there, I don't understand how we can logically deduce that an Or gate is needed to connect the two carries. This is the truth table, but I have no clue why this connects the two HalfAdder and the output carry. Can somebody explain? ``` c1 | c2 | Or 0 | 0 | 0 0 | 1 | 1 1 | 0 | 1 1 | 1 | 1 ```
Open this post in threaded view
|

 Administrator This post was updated on . Consider the possibilities: when performing C = A + B + carry_in where A and B are two one-bit inputs and C is a two bit output (C_carry, C_sum) you are just adding three bits together, right. So consider the possibilities. You use a half-adder to add any two of the bits (let's say A and B). This produces a two-bit partial result consisting of a sum and a carry. How many possible results are there? Only three! You can't add two bits together and get 11. So we don't have to consider this case at all. Now you want to add another bit to this result using another half adder. How would you do it by hand and what are the possibilities? ```With Cin = 0 A+B : 00 01 10 +Cin : 0 0 0 result: 00 01 10 With Cin = 1 A+B : 00 01 10 +Cin : 1 1 1 result: 01 10 11 ```Notice that there are three cases where the Cout bit is a 1. In the first case, it is because of the Carry from adding A+B. In the second case it is because of the Carry from (A+B)+Cin. In the third, it is again because of the Carry from (A+B). 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. So the Cout bit is a 1 whenever there is a Carry from EITHER of the two half-add operations.