Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: $Revision: 1.6.2.16 $; site ima.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!bellcore!decvax!ima!johnl From: johnl@ima.UUCP Newsgroups: net.lang.c Subject: Re: Right shift vs. divide Message-ID: <124000005@ima.UUCP> Date: Wed, 1-Jan-86 23:01:00 EST Article-I.D.: ima.124000005 Posted: Wed Jan 1 23:01:00 1986 Date-Received: Sat, 4-Jan-86 05:31:54 EST References: <974@brl-tgr.UUCP> Lines: 11 Nf-ID: #R:brl-tgr:-97400:ima:124000005:000:507 Nf-From: ima!johnl Jan 1 23:01:00 1986 Now that we know that right shifting is not the same as division, has anybody ever come up with a plausible reason for computers to have arithmetic shift instructions on twos complement machines (other than that they're easy to implement and poorly educated engineers might have thought they were the same as division)? For positive numbers, they give the same result as unsigned shifts, and for negative numbers they give the wrong answer. Followups to net.arch, please. John Levine, ima!johnl