title: How to calculate Decimal number of one's compliment in swift?
body: <p>I have a decimal number and I want to convert first 8 bits of that number into one's compliment(Even If it's more than 8 bits number) ..</p>
  
  <p>For Example I have number 633 while I convert this to binary form it will be  0010 0111 1001 </p>
  
  <p>When I do one's compliment of first 8 bits it's become 1000 0110 and the decimal number of this binary is 134 ..</p>
  
  <p>I am trying to achieve this by programmatically please help ..thanks in advance.  </p>