Exponential Operator


Results 1 to 12 of 12

Threaded View

  1. #4
    sinoteq's Avatar
    sinoteq Guest


    Did you find this post helpful? Yes | No

    Default Not sure but...

    Have you looked at the shift functions >> and << around page 32 in the PBP manual?
    row 1 = %0001
    row 2 = %0010
    row 3 = %0100
    row 4 = %1000
    If you want a byte or word to do the above thing this might work:

    X var Byte
    Y var Byte

    Y=1 'Now Y=%00000001
    For x=0 to 6 Step 1
    Y=Y << 1 'Shift Y left one time, Y=%00000010,Y=%00000100,Y=%00001000
    Next x

    This command is also usefull when combining nibbles and other stuff, shift happily left or right as you see fit.
    Last edited by sinoteq; - 26th October 2007 at 04:25.

Similar Threads

  1. what is objective of this operator "*/" ?
    By iugmoh in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 17th April 2008, 03:43
  2. Exponential
    By civicgundam in forum General
    Replies: 8
    Last Post: - 3rd February 2008, 18:19
  3. '*/' operator
    By jblackann in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th January 2007, 21:00
  4. math operator LOG
    By Eyal in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 23rd July 2004, 00:45
  5. Log and exponential
    By anj in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 5th March 2004, 21:03

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