Hi again
been stumped for at least a few days with this introductory 2's complement section of Programming the 6502 by Rodnay Zaks. it's a great book, i just seem bo be having a problem figuring out how certain things work i guess. like most of the whole 2's complement thing makes sense to me, until i start trying to work it out
is this correct?? and if it is correct, has an overflow or an underflow occured? i'm not even sure that i can tell when one of these take place cause i've read about it being different than unsinged binary, though i'm not sure why it is.
been stumped for at least a few days with this introductory 2's complement section of Programming the 6502 by Rodnay Zaks. it's a great book, i just seem bo be having a problem figuring out how certain things work i guess. like most of the whole 2's complement thing makes sense to me, until i start trying to work it out
Code:
;signed numbers:
10111111
11000001
------------
10000000
;but the real answer is
10000001
;cause in 2's complement, you ad 1 to it to get the result?
10111111
11000001
------------
10000000
;but the real answer is
10000001
;cause in 2's complement, you ad 1 to it to get the result?
is this correct?? and if it is correct, has an overflow or an underflow occured? i'm not even sure that i can tell when one of these take place cause i've read about it being different than unsinged binary, though i'm not sure why it is.