Saturday 15 May 2010

binary - Two's Complement Value of 011101 -


I know the answer is 29, but I'm not sure how it arrived.

Usually I get 011101 in reciprocity of 100010 and add 1 to get 100011.

Its value is 35. Then how does the answer 29?

  011101 is 29 binary to decimal 100011 + 011101 = 000000 // 100011 inversion + 1 100011 = -011101 100011 = -29   

There is no '35' because any number starting with '1' in the complimentary system of two is a negative number. This means, assuming 6-bit, that any number greater than 31 (011111) is actually a negative number.

No comments:

Post a Comment