PE> 1000 0000 0000 0000 0010
PE> 1000 0000 0000 0000 0001 (ie -2 turns into -1)
BL> I assume that you are confusing the SHR *logical* instruction with
BL> the DIV or IDIV *arithmetic* instruction. I agree that the numbers you
BL> end up with may be different if you do bit-shifts, but not the bits.
BL> But you are saying the opposite... that doing a SHR instruction may
BL> not give you a bit-shift. You may be correct, I don't know, but on
I'm not actually saying that about the SHR instruction of an 80386. What
I'm actually saying is that this sort of thing is potentially possible, and
may exist on current machines.
BL> your past performance it would be dangerous for me to take what you
BL> say as gospel. All I can do is file what you say under "Paul Edwards
BL> Information" in my brain and see how it turns out.
What I can say for sure is that unless you define your integer as unsigned,
(OR the number is positive) you don't have any guarantee on that top bit.
You can refer to the standard on that one, no need for me. Regardless of
whether the machine uses 2's complement or signed-magnitude or anything
else, it's guaranteed to work. BFN. Paul.
@EOT:
---
* Origin: X (3:711/934.9)
|