What makes signed integers behave differently?
Posted
by
000
on Programmers
See other posts from Programmers
or by 000
Published on 2012-09-14T16:59:27Z
Indexed on
2012/09/14
21:47 UTC
Read the original article
Hit count: 345
assembly
In this example of x86_64 hex/disassembled code I see:
48B80000000000000000 mov rax, 0x0
Signed Byte 52
Unsigned Byte 52
Signed Short 14388
Unsigned Short 14388
Signed Int 943863860
Unsigned Int 943863860
Signed Int64 3472328296363079732
Unsigned Int64 3472328296363079732
Float 4.630555e-05
Double 1.39804332763832e-76
String 48B80000000000000000
which to me appears to have the same functionality as:
48C7C000000000 mov rax, 0x0
48C7C000000000
Signed Byte 52
Unsigned Byte 52
Signed Short 14388
Unsigned Short 14388
Signed Int 927152180
Unsigned Int 927152180
Signed Int64 3472328377950746676
Unsigned Int64 3472328377950746676
Float 1.163599e-05
Double 1.39806836023098e-76
String 48C7C000000000
How is the first example treated differently from the second example?
© Programmers or respective owner