Bitwise Operators


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2007
    Location
    West Hollywood, CA
    Posts
    38

    Default Bitwise Operators

    Maybe I am just tired, but I can't figure out how to do bitwise operations on the lowest four bits of two numbers, without working on one bit at a time.

    I saw the masking thread, but it didn't seem to answer my question.

    Lets say:
    A = %10100010
    B = %00000100

    how can I get to:
    %10100100

    -Sterling

  2. #2
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile

    C = (a & $f0) + (b & $0f)
    Paul Borgmeier
    Salt Lake City, UT
    USA
    __________________

  3. #3
    Join Date
    Mar 2007
    Location
    West Hollywood, CA
    Posts
    38


    Did you find this post helpful? Yes | No

    Default

    Thank you!!!

Similar Threads

  1. Logical vs Bitwise ==
    By Archangel in forum General
    Replies: 7
    Last Post: - 19th February 2010, 06:22
  2. Bitwise operations and masks: basics, help?
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 19th April 2008, 00:24
  3. Bitwise not working
    By Ioannis in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 19th October 2006, 07:31
  4. Bitwise AND
    By paul.mcallister in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 16th February 2005, 05:22
  5. Bitwise Operations
    By rossfree in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 5th November 2004, 13:58

Members who have read this thread : 1

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