1- Adding Two One-bit Numbers M and N - Half Adder
We first review adding two decimal (base 10) numbers before considering adding binary (base 2) numbers.
We start from the right digits (units) 9 and 6. Adding 9 and 6, gives 15 , but because 15 is greater than 10 (the base), we keep the 5 in the same column as 9 and 6 but the "1" is carried and added to the next digits (1 and 2) to the left of the first digits. We then continue with the next digits moving to the left till the last digits.
In computers, the binary system (or base 2) is used. Two digits (0 and 1) are needed to write numbers.
Explanation: 1 + 1 = 2 in decimal and 2 written in binary is 10 (2 = 1*21 + 0*20)
More additions of one-bit numbers are shown below.
It is easy to note that the "Sum" corresponds to the output of an exclusive OR (XOR) logic gate and the "Carry" corresponds to the output of an AND logic gate. Hence the following simplified circuit could be used to add two bits and also generate the carry.
2 - Adding Two One-bit Numbers M and N and the Carry - Full Adder
We now add two bits M and N and a carry Ci (input carry) from previous addition. Because we are taking into account a possible carry Ci, this is called a full adder of binary numbers. The outputs are the sum S and the carry Co.
How do we add 3 one-digit numbers?
The table below shows all possible values of the inputs M, N and Ci and the outputs S and Co.
3 - Adding Two 8-bit Numbers - Full Adder
We now show the diagram of a circuit that can used to add two 8-bit digit numbers M and N. It is made up of a series of 8 full adders. The addition start from the right with the lowest significant bit (LSB) and progress towards the most significant bit (MSB).
4 - An Online Two 8-bit Full Adder Simulator
Below is shown an online simulator for an 8-bit full adder.
N = (8 bits only using 1's and 0's only)
The answer to the sum is given by the digit C7 S7 S6 S5 S4 S3 S2 S1 S0 in this order.