Shifting Bits


Closed Thread
Results 1 to 2 of 2

Thread: Shifting Bits

  1. #1
    Join Date
    Jan 2014
    Posts
    1

    Default Shifting Bits

    Hi All

    Can someone please help me.

    Ive got 20 bits of data that i shiftin the following way.

    Temp var word
    TempB var word
    TempC var Long

    Shiftin B3,B2,MSBPost,[Temp\16,TempB\4]

    How do i get Temp & TempB into Variable TempC so that TempC would only contain my 20 bits of data.

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Shifting Bits

    Just shift everything into TempC
    Shiftin B3,B2,MSBPost,[TempC\20]
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Replies: 2
    Last Post: - 23rd April 2013, 16:34
  2. Shifting bits
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 22nd February 2011, 17:46
  3. multiplication vs shifting
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 10th April 2010, 06:57
  4. DT_INTS-14 /interrupts enable bits / flag bits
    By bogdan in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 16th May 2009, 18:42
  5. shifting problem
    By helmut in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 31st August 2007, 06:11

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