title: Hex to 2's complement in objective-c
body: <p>I'm trying to convert a hex value e.g. <code>0xFAE8</code> to a 2's complement decimal i.e. <code>-1304</code>.</p>
  
  <p>I've tried looking at this <a href="https://stackoverflow.com/questions/21931789/convert-binary-twos-complement-data-into-integer-in-objective-c">Convert binary two&#39;s complement data into integer in objective-c</a>
  but I don't really get how the byte-shifting enables the conversion to be done properly. I hope there can be an explanation or a simpler way to do it. Thanks.</p>