Ladih
Ladih

Reputation: 811

What is the correct way to represent a negative number in binary system?

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.

Upvotes: 0

Views: 382

Answers (1)

Patrick M
Patrick M

Reputation: 1

Usually you want to use the second approach. It allows you to keep your addition methods unchanged.

Google will answere this question for you ;-)

Upvotes: 0

Related Questions