Main
Rules of use
Contact
FAQs
News & Issues 1
Group
Forum
Member
More
0b10001100
If I replace the number above with decimal, the result is -116, but I don't know why -116.
MSB is 1, so it is negative.
Replacing a negative number with two's complement makes it positive.
0b10001100 // original number
0b01110011 // 1's complement
0b01110100 // 2's complement (1's complement + 1)
0b01110100 taking the boss of 2 has the value 116, so the original number is -116.
2's complement is used to convert negative and positive numbers.
0b10001100
MSB is 1, so it is negative.
Replacing a negative number with two's complement makes it positive.
0b10001100 // original number
0b01110011 // 1's complement
0b01110100 // 2's complement (1's complement + 1)
0b01110100 taking the boss of 2 has the value 116, so the original number is -116.
2's complement is used to convert negative and positive numbers.