Shifting a whole array sideways by one bit ( >>1)


Closed Thread
Results 1 to 3 of 3

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default Re: Shifting a whole array sideways by one bit ( >>1)

    How about
    Code:
    myArray VAR BYTE[11]
    Index VAR BYTE
    
    For Index = 0 to 87
      myArray.0[Index] = myArray.0[Index+1]
    NEXT
    /Henrik.

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,139


    Did you find this post helpful? Yes | No

    Default Re: Shifting a whole array sideways by one bit ( >>1)

    If bits are 88 then I think we need 86 iterations in the loop and fill the last bit in the myArray by a 0.

    Ioannis

Similar Threads

  1. bit position variable
    By dsicon in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 16th December 2012, 21:41
  2. A little help with shifting out Arrays?
    By Ryan7777 in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 16th October 2012, 16:31
  3. shifting in decimals
    By lerameur in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 12th November 2011, 21:41
  4. Shifting bits
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 22nd February 2011, 17:46
  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 : 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