An electronic circuit that adds up two binary numbers.
XOR consists another logic gates:
The top picture shows a half adder.
A is the first binary number. B is the second binary number. They are summed using XOR (upper logic gate). Carry is defined using AND (lower logic gate).
XOR (Sum Out) and AND (Carry Out)
A - 0, B - 0: Sum Out - 0 and Carry Out - 0;
A - 0, B - 1: Sum Out - 1 and Carry Out - 0;
A - 1, B - 0: Sum Out - 1 and Carry Out - 0;
A - 1, B - 1: Sum Out - 0 and Carry Out - 1.
We can denote the half adder in this way:
Then the full adder is denoted in this way:
So, Carry Out of the previous half adder is summed with the result of the following half adder.
We can denote the full adder in this way:
The binary adder consists of full adders (for example, 8-Bit Sum):
And we can denote it in this way:
16-bit adder consists two 8-Bit Adder etc.
Comments
Leave a comment