In binary:
The binary addition algorithm
is a
Let us start by adding 1-bit integers. The operation is performed on three operands (three input values). Arrange the bits into a column. The bit at the top of the column is called the "carry into the column".
To add two 1-bit (representations of) integers: Count the number of ones in a column and write the result in binary. The right bit of the result is placed under the column of bits. The left bit is called the "carry out of the column". The following table shows the outcomes with all possible operands.
Binary Addition Table the carry into the column | | 1 1 1 1 0 0 0 0 <--- 1 0 1 0 1 0 1 0 1 1 0 0 1 1 0 0 --- --- --- --- --- --- --- --- 11 10 10 01 10 01 01 00 ^ | the carry out of the column