0
$\begingroup$

I need to transform 2's complement from binary to decimal

The binary integer is 10001001

This is my thought process. Could someone validate my thought process or correct it, please?

10001001 it is a negative integer as the sign magnitude is 1. 
Toggle the bits: 01110110 
Add 1: 01110111 
Binary to decimal 64 + 32 + 16 + 4 + 2 + 1 = 119 
Since the original value vas negative, the final result is -119
$\endgroup$
1
  • $\begingroup$ If number of digits is $8$, then your calculations are correct. $\endgroup$ – zkutch Feb 9 at 10:53

Your Answer

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

Browse other questions tagged or ask your own question.