A86: Negative numbers, sign bits, and the sign flag.
[Prev][Next][Index][Thread]
A86: Negative numbers, sign bits, and the sign flag.
I have read that a negative byte is represented by counting down from
255. So -1 would be 254, -2 would be 253, etc. But how do you know if
%11111101 represents 253 or -2? I have also read that bit 7 of a byte is
called the sign bit and can be used to determine if a number is positive or
negative, but this does not make sense to me since %11111110 is 254 which is
a positive number even though the sign bit is set. (Unless you interpret it
as -1 which goes back to my first question.) And also, when and how is the
sign flag affected and how can you check it? Thanks for your help.