Yesterday I asked a similar question and realized I still don't quite get it, so I'm sorry about that.

Here is explicitly what I mean:

enter image description here

This is a part of a full adder. The first row in which carry in equals 1 makes sense to me, because the row before that, carry out equals 1. But why does carry in equal 1 the second time, when on the previous row carry out is equal to 0?

Would really appreciate some simple explanation.

Thanks in advance!

  • 1
    \$\begingroup\$ you are not understanding the table ... the rows stand on their own ... one row does not affect any other row .... print the table onto paper, then use scissors to cut into individual rows .... look at only one row at a time \$\endgroup\$ – jsotola Aug 19 '19 at 18:35
  • 1
    \$\begingroup\$ Maybe you should study truth-tables, since your problem isn't really about how adders work, but how truth-tables work. \$\endgroup\$ – Harry Svensson Aug 19 '19 at 18:59
  • 1
    \$\begingroup\$ I think you should look up the circuit diagram for a full adder on Google or somewhere and you will see how the individual inputs correspond to the outputs. At the minute you're looking at a truth table for a circuit and trying to work backwards to understand how the inputs correspond to the outputs. \$\endgroup\$ – David777 Aug 19 '19 at 19:20
  • \$\begingroup\$ Thanks @David777, I will try that. \$\endgroup\$ – user472288 Aug 19 '19 at 19:26
  • 1
    \$\begingroup\$ When I once had this question, it became clear for me when you see the 3 inputs (A, B and Carry In) connected to an AND gate and an XOR gate. Where the ones on the outputs come from should become obvious. \$\endgroup\$ – David777 Aug 19 '19 at 19:30

The rows do not indicate any kind of sequence or relationship. This is simply a table of 3 inputs (A, B, CarryIn) and two outputs (Sum, CarryOut). We could put the rows in any order and it wouldn't matter.

Simply count the number of 1 bits in the three inputs. If there are two or three ones then the CarryOut will be 1, else it is 0. It there are one or three ones on the inputs then Sum will be 1, else it is 0.

  • \$\begingroup\$ I see, well I just pictured it as simple binary addition (row for row) but apparently that's not it. Thanks. \$\endgroup\$ – user472288 Aug 19 '19 at 18:36
  • 2
    \$\begingroup\$ It's binary addition horizontally across a single row. The inputs are the first 3 columns and the outputs are the last 2 columns. \$\endgroup\$ – Elliot Alderson Aug 19 '19 at 18:50
  • \$\begingroup\$ Thank you, I think I understand it better now. \$\endgroup\$ – user472288 Aug 19 '19 at 19:00

All three inputs to the adder have equal weight, 1.

The output will represent how many are 1, so the counts, 0, 1, 2 or 3. Expressing those counts in binary, we have 00, 01, 10 and 11.

You can regard the carry and sum outputs, in that order, as those two bits of binary, with carry having weight 2, and sum having weight 1.

So finally, we can read the table as

if all of A, B or Cin are 0,        then output is Cout:0, S:0  
if any one of A, B or Cin is 1,     then output is Cout:0, S:1  
if any two of A, B or Cin are 1,    then output is Cout:1, S:0  
if all three of A, B and Cin are 1, then output is Cout:1, S:1  

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.