title: Why do I need to add 1 when using the neg assembly command?
body: <p>Why do I need to add 1 when using the neg assembly command?</p>
  
  <p>When I take the original r8 value, and subtract it from all F's, I should get the "neg" value of it. But I actually get 1 higher so I need to increase the initial value by 1, or subtract the result by 1.</p>
  
  <pre><code>;mov r8, 0x2f2f2f6e6962732f ; /sbin/shutdown
  ; &gt;&gt;&gt; hex(0xFFFFFFFFFFFFFFFF-0x2f2f2f6e6962732f) = '0xd0d0d091969d8cd0
  ;mov r8, 0xd0d0d091969d8cd0 ; either add 1 to this value, or subtract 1 after the neg statement
  mov r8, 0xd0d0d091969d8cd1
  ;pushf
  neg r8
  ;popf
  ;sub r8, 1
  </code></pre>
  
  <p>Thanks in advance!</p>