Re: Shift Operation
In article <1160487007.734 018.243340@m7g2 000cwm.googlegr oups.com>,
Ancient_Hacker <grg2@comcast.n etwrote:
To divide by 2?
-1, which is (-1)/2 rounded down (which is the behaviour I usually
want from integer division).
-- Richard
In article <1160487007.734 018.243340@m7g2 000cwm.googlegr oups.com>,
Ancient_Hacker <grg2@comcast.n etwrote:
>Why would you ever want to do an "arithmetic " right shift on a negative
>number?
>number?
>Even if the "sign" bit got shifted into the top bits, the result is
>mostly mathematically useless. i.e. shift of -1 on a two's complement
>machine gives you .....
>mostly mathematically useless. i.e. shift of -1 on a two's complement
>machine gives you .....
want from integer division).
-- Richard
Comment