Binary number system

So you want to say that

  1. to represent/find the negative of a number we need to find 2’s complement

  2. to store a negative number in computer memory we use the rightmost bit as a flag.

so basically both are practically different and (1) is to represent/find for user/programmer (2) is for computer how it should be stored.

?

okay, i get it. MSB is 1 for negative numbers but the number is also the 2’s complement that is storedstored in memory.

@immanishbainsla
You are right. If you are still a bit confused , take a look at these numbers

Decimal Value Binary ( 2’s complement representation) Two’s complement
0 0000 0000 0000 0000
1 0000 0001 1111 1111
2 0000 0010 1111 1110
126 0111 1110 1000 0010
127 0111 1111 1000 0001
−128 1000 0000 1000 0000
−127 1000 0001 0111 1111
−126 1000 0010 0111 1110
−2 1111 1110 0000 0010
−1 1111 1111 0000 0001

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.