The question is about the Practice Problem 2.18 from the Computer Systems: A Programmer Perspective by Randal Bryant which states:
For the lines labeled A–I (on the right) in the following listing, convert the hexadecimal values (in 32-bit two’s-complement form) shown to the right of the instruction names (sub, mov, and add) into their decimal equivalents (this is a disassembled program):
4004d0: 48 81 ec e0 02 00 00 sub $0x2e0,%rsp |
A | 736 |
4004d7: 48 8b 44 24 a8 mov -0x58(%rsp),%rax |
B | -88 |
... | ... | ... |
If I understand correctly from the problem "shown to the right of the instruction names" means these values - 0x2e0
and -0x58
. But they don't seem to be in the two's complement form, they are just unsigned integers with the minus sign before them (probably I'm missing something).
What do I understand wrong here? Where are 32-bit hex values written in the two's complement form?