Computer Science, asked by tac271363, 9 months ago

what is the difference between 1's and 2's compliment with an appropriate example

Answers

Answered by Anonymous
3

2's complement of a binary number is 1 added to the 1's complement of the binary number. ... Another difference is that while adding numbers using 1′ s complement, we first do binary addition, then add in an end-around carry value. But, 2′ s complement has only one value for zero, and doesn't require carry values.

For example, 2's complement of “01000” is “11000” (Note that we first find one's complement of 01000 as 10111). If there are all 1's (in one's complement), we add an extra 1 in the string. For example, 2's complement of “000” is “1000” (1's complement of “000” is “111”).

Similar questions