title: How to compare a signed value and an unsigned value in x86 assembly
body: <p>I am having trouble finding a way to compare a positive number and a negative number in x86 assembly code.</p>
  <p>For example: when I compare -1 and 1 I always get -1 as greater. I know that it's because 2's complement format makes the -1 bigger than 1 in underlying binary.</p>
  <p>But can anyone provide a snippet of x86 assembly to compare positive number with a negative one and get it mathematically correct? (e.g 1 &gt; -1)</p>