I am doing one question in which we have to find 2's complement of 43. I know to find 2's complement we have to find 1's complement and then add 1 into it to get 2's complement.
So here is how I am doing it -
Binary value of 43 is 00101011. (We have to use 8-bits to represent)
1's complement is 11010100.
2's complement is 11010101.
But the original answer is 00101011.
I used some online converter and they are giving same answer as the original one. But i don't find any mistake in my method. So please help me to understand my mistake and how to get the original answer.
Edit -
This is the link to online converter : Click Here.
Update -
As said by one user that my question is wrong or it is wrong in textbook. It is not. Same wording of question above in my question. Here's the link from which I am solving this question before.
Click here to see.
And I wrote answer later from this link. As you can see in my answer below.
Your answer is correct. In two's-complement representation, positive numbers are simply represented as themselves, and negative numbers are represented by the two's complement of their absolute value.
Here's Wikipedia explanation you can see.