Professional Documents
Culture Documents
Binary Addition using 1ÔÇÖs and 2ÔÇÖs complement
Binary Addition using 1ÔÇÖs and 2ÔÇÖs complement
Architecture(KCS 302)
Binary Addition using signed 1’s and
2’s complement form
Binary Addition using 1’s Complement
• Solution:
• +1110 ⇒ 01110
00000
1 carry
00001
00001
1 carry
00010
Hence the required sum is + 0010.
• Case II: When the negative number has
greater magnitude.
• In this case the addition is carried in the same
way as in case 1 but there will be non end-
around carry. The sum is obtained by taking
1’s complement of the magnitude bits of the
result and it will be negative.
Example
• The following examples will illustrate this method in binary
addition using 1’s complement:
• Find the sum of the following binary numbers represented in
a sign-plus-magnitude 5-bit register:
• (i) + 1010 and - 1100
• Solution:
• +1010 ⇒ 01010
11101
Hence the required sum is – 0010.
• (ii) + 0011 and - 1101.
• Solution:
• +0011 ⇒ 00011
10101
Hence the required sum is – 1010.
• When the two numbers are negative
• For the addition of two negative numbers 1’s
complements of both the numbers are to be
taken and then added. In this case an end-around
carry will always appear. This along with a carry
from the MSB (i.e. the 4th bit in the case of sign-
plus-magnitude 5-bit register) will generate a 1 in
the sign bit. 1’s complement of the magnitude bits
of the result of addition will give the final sum.
Example
• The following examples will illustrate this method in binary addition using 1’s complement:
• Find the sum of the following negative numbers represented in a sign-plus-magnitude 5-bit
register:
• (i) -1010 and -0101
• Solution:
• - 1 0 1 0 ⇒ 1 0 1 0 1 (1’s complement)
01111
1 carry
10000
• 1’s complement of the magnitude bits of sum is 1111 and the sign bit is 1.
• Hence the required sum is -1111.
Example
• (ii) -0110 and -0111.
• Solution:
• -0110 ⇒ 11001 (1’s complement)
10001
1 carry
10010
-0011 ⇒ 11101
11110
11101