Site icon Learn Web Development & Programming, Artificial Intelligence, WordPress, Shopify Articles

How a negative integer is stored.

Get the two’s compliment of the same positive integer. Eg: 1011 (-5)

Step-1 − One’s compliment of 5 : 1010

Step-2 − Add 1 to above, giving 1011, which is -5

Exit mobile version