Two's Complement Binary to Decimal

Two's Complement Binary to Decimal

I'm having trouble converting the following two’s complement binary number to decimal

01110000

Step 1: Invert the bits -> 10001111 Step 2: Add 1 to the bit -> 10010000

Therefore, the decimal value is 144

However, I used online converter and it says the decimal value is 112

2

1 Answer

The value of ...111 0111 0000 (padded with an infinite number of 1's) is -144. The value of ...000 0111 0000 (padded with an infinite number of 0's) is 112. Given the former, one could compute its additive inverse by inverting all the bits (yielding ...000 1000 1111) and adding 1 (yielding ...000 1001 0000, i.e. 144).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Marcus Vance
Author

Marcus Vance

Marcus Vance is a cybersecurity auditor and technology writer dedicated to educating the public about online safety, data privacy regulations, enterprise security, and emerging cyber threats.