Steps
1. Convert first number (12345869) to binary.
2. Convert second number (-987654321) to binary.
3. Add both the binary numbers.
Step 1
:
- (12345869)10 is equal to (0000 0000 1011 1100 0110
0010 0000 1101)2 in binary.
Step
2:
- (987654321)10 is equal to (0011 1010 1101 1110 0110
1000 1011 0001)2 in binary.
- But to convert the positive number into negative, we need to
find the 2's Complement of the (987654321).
2's Complement of number = 1's Complement of number +
1
- 1's Complement of any binary number is computed by inverting
the each bit of binary. For example 1's complement of 1100 is equal
to 0011. Hence 1's Complement of (0011 1010 1101 1110 0110 1000
1011 0001) is equal to (1100 0101 0010 0001 1001 0111 0100
1110).
- By adding the 1 to the above binary number, 2's Complemented
computed is (1100 0101 0010 0001 1001 0111 0100 1111).
Step
3:
- To add the two bits, following bit addition table is used.
- Hence the Addition of both the binary number is done as
following:
- Hence the binary sum is (1100 0101 1101 1101 1111 1001
0101 1100)2 . As the Most Significant
Bit (Left Most Bit) of the sum is 1,
hence the resulting number is negative.
- To reconfirm the binary addition, we need to convert the binary
number into decimal. Hence to find the decimal of negative binary
number, we need to find the 2's Complement and then convert the
binary into decimal.
2's Complement = 1's Complement + 1
- 1's Complement of (1100 0101 1101 1101 1111 1001 0101
1100)2 is (0011 1010 0010 0010 0000 0110 1010
0011)2 .
- 2's Complement is (0011 1010 0010 0010 0000 0110 1010
0100)2 after adding 1 to 1's Complement.
- (0011 1010 0010 0010 0000 0110 1010 0100)2 is
equivalent to (975308452)10 in Decimal number system.
Hence the number is -975308452
- By the decimal number system of addition
(12345869+(-987654321)) is equal to - 975308452. Hence the
additions result is correct.