title: Determine the Carry, Zero and Sign flag with cmp?
body: <p>Determine the Carry, Zero and Sign flag with cmp?</p>
  
  <pre><code>mov al, 5
  cmp al, 7
  </code></pre>
  
  <p>The carry flag is set to 1, the zero flag is set to 0 and the sign flag is set to 1.</p>
  
  <p>5-7 = -2, so I understand why the sign flag will be turned on and the zero flag will be the same, but why is the carry flag turned on? </p>
  
  <p>From my understanding, a carry flag is turned on when there is an unsigned integer overflow. I'm not really understanding how that applies here.</p>