Inverting numbers


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default

    Hi,
    Code:
    myValue VAR BYTE
    myValue = 255 - myValue
    Now, if myValue is 0 you'll get 255, if myValue is 255, you'll get 0.

    /Henrik.

  2. #2
    Join Date
    Aug 2008
    Posts
    42


    Did you find this post helpful? Yes | No

    Default Working!

    Thanks Henrik, I guess I shouldn't have slept through math class. Your the man!.

  3. #3
    Join Date
    Jun 2005
    Location
    Up the bush, Western Plains, NSW Au
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    Why don't you reverse the connections to the pot?
    /
    Peter Moritz.
    Up the bush, Western Plains,
    New South Wales,
    Australia.

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