I've seen two ways to represent a negative number in binary system. One approach is having the left-most digit as a signed bit, 0 indicating positive and 1 indicating negative. Another approach is taking 2'complement of a positive number to get its opposite number.
Asked
Active
Viewed 115 times
0
-
What do you mean by "correct"? Most systems use 2s-complement these days but I wouldn't call it "correct". – tkausl Jun 30 '16 at 02:20
-
1Voting to close as primarily opinion-based (which in fact this is). Either system works well, neither is 'better' than the other. – Akshat Mahajan Jun 30 '16 at 02:22
-
http://stackoverflow.com/questions/2931630/how-are-negative-numbers-represented-in-32-bit-signed-integer – crashmstr Jun 30 '16 at 02:22
-
Yes `2'complement` – Enzokie Jun 30 '16 at 02:28
1 Answers
0
Usually you want to use the second approach. It allows you to keep your addition methods unchanged.
Google will answere this question for you ;-)

Patrick M
- 1
- 2