Exetools

Exetools (https://forum.exetools.com/index.php)
-   General Discussion (https://forum.exetools.com/forumdisplay.php?f=2)
-   -   As represent negatives hexadecimals numbers (https://forum.exetools.com/showthread.php?t=15621)

kcire_eae 02-15-2014 07:56

As represent negatives hexadecimals numbers
 
help, somebody can me tell as represent negatives hexadecimals numbers.
I am learning assembly language but i need know this for continue.

h8er 02-15-2014 11:09

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

kcire_eae 02-16-2014 02:24

ok thank you very much, this book is very interesting. i'll try read all to understand best somethings that still i do not understand


All times are GMT +8. The time now is 05:18.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX