![]() |
|
#2
|
|||
|
|||
|
The x86 architecture uses the two's complement for negative numbers, to calculate the two's complement of a number you calculate the one's complement and then you add 1.
So for a signed 32 bit dword value you calculate the bitwise NOT of it and then you add 1. For example the number 34d is 0x00000022h so -34d = (NOT 0x00000022h) + 0x00000001h = 0xFFFFFFDDh + 0x00000001h = 0xFFFFFFDEh I advise you to read The Art of Assembly Language, it's a good start for learning assembly |
| The Following User Gave Reputation+1 to h8er For This Useful Post: | ||
chessgod101 (02-16-2014) | ||
|
|