This device will add together A and B to give S. C4 is the carry from the top bit and indicates that the result is larger than 15. C0 is the carry input; by connecting C4 from one device to C0 from another an 8 bit adder can be made.
In order to add two bits together use the following truth table
ab|cs --|-- 00|00 01|01 10|01 11|10Truth Table for addition of two bits. s is the sum and c is the carry.
s=a XOR b, c=a AND b
In order to add three bits together use the following truth table:
cab|cs ---|- 000|00 001|01 010|01 011|10 100|01 101|10 110|10 111|11Truth Table s=(a XOR b) XOR c, c=(a AND b) OR (a AND c) OR (b AND c).