title: How to convert unsigned numbers from signed to unsigned(binary and hexadecimal)?
body: <p>So i'm trying to learn assembly language from Randall Hyde's book : The art of assembly language, and i've finished learning the first chapter and now i'm trying to do the exercises.
  And i have the following question : how can i convert a binary value (positive or negative)
  into a hexadecimal value of the opposite sign.And yes i know how to represent numbers from 0 to 15 in binary and also that 10 is f and so on...
   The problem that i have is the following ..i am given this number : 1001 1001 and i have to convert it in the opposite value.So far i have used the two's complement and have obtained this :</p>
  
  <pre><code>1001 1001 -----&gt;shifting bits -----&gt; 0110 0110
                  add 1         -----&gt; 0110 0111
  </code></pre>
  
  <p>And i should've obtained the opposite of the first number.Instead,when i'm calculating the values of the results i get this:</p>
  
  <pre><code>1001 1001 = 2^0+2^3+2^4+2^7 = 1+8+16+128 = 153 (which in my opinion is fine...)
  </code></pre>
  
  <p>and after converting the number i get this:</p>
  
  <pre><code>0110 0111= 2^0+2^1+2^2+2^5+2^6 = 1+2+4+32+64 = -103
  </code></pre>
  
  <p>What am i doing wrong ?</p>