shifting negative long vars


Results 1 to 5 of 5

Threaded View

  1. #5
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    after some playing i found a simpler way:

    Code:
    negative=x.31           ' Save the sign bit
    x=(ABS x)>>8            ' Shift the absolute value
    IF negative THEN x=0-x  ' Make negative again
    Last edited by Kamikaze47; - 26th April 2010 at 17:55.
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts