I am new to Binary and we are learning it for my computer hardware class. Since I am just learning, I am not very sure how to represent negative numbers in binary.
I believe they are Signed magnitude, ones complement, and two's complement, but I need an example. I'm not really sure how to show how this is done exactly.
Best Answer
There's no shame in representing decimal -2 as binary -10. In computer science there are different ways to represent negative numbers.
Sometimes, in a method called one's compliment, in order to take the negative number you need to flip all of the bits; for example, 101 negated would be 010.
In a method called two's compliment, you start from the right, find the first '1', and invert all of the bits to the left of that '1': 101001000 negated would be 010111000
https://en.wikipedia.org/wiki/Signed_number_representations
Anyway, it really just depends on how you want to represent it.