TIP: Click on subject to list as thread! ANSI
echo: locsysop
to: Paul Edwards
from: Bob Lawrence
date: 1996-10-01 08:02:20
subject: Public Domain Pascal

PE> In a signed-magnitude computer, where -2 is represented (16-bit) as

 PE> 1000 0000 0000 0000 0010

 PE> if you did a right shift of 1 bit, what would you expect?

 PE> 0100 0000 0000 0000 0001  (ie -2 turns into 16385)

 PE> or

 PE> 1000 0000 0000 0000 0001 (ie -2 turns into -1)

  I assume that you are confusing the SHR *logical* instruction with
the DIV or IDIV *arithmetic* instruction. I agree that the numbers you
end up with may be different if you do bit-shifts, but not the bits.

  But you are saying the opposite... that doing a SHR instruction may
not give you a bit-shift. You may be correct, I don't know, but on
your past performance it would be dangerous for me to take what you
say as gospel. All I can do is file what you say under "Paul Edwards
Information" in my brain and see how it turns out.

Regards,
Bob
___ Blue Wave/QWK v2.12
@EOT:

---
* Origin: Precision Nonsense, Sydney (3:711/934.12)
SEEN-BY: 711/934 712/610
@PATH: 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.