[A83] Re: Signed division by a power of two.


[Prev][Next][Index][Thread]

[A83] Re: Signed division by a power of two.



I do not think that will be a problem, but I will keep it in mind...

MWM

----- Original Message -----
From: pad <pad@OCF.Berkeley.EDU>
To: <assembly-83@lists.ticalc.org>
Sent: Tuesday, August 12, 2003 5:23 PM
Subject: [A83] Re: Signed division by a power of two.


> The sra instruction does divide a signed byte by 2.  But take note of what
> happens when the number is not even.  In this case, the low bit is
discarded,
> so the value is always rounded down.  Thus if you divide 1 by 2, you get
0,
> but dividing -1 by 2 will not give 0, but rather -1 again.  Whether or not
> this is a problem may depend on your exact application
>
>
>
>




References: