handling Large Numbers


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Feb 2005
    Posts
    67


    Did you find this post helpful? Yes | No

    Default

    Page 31 4th line down in mine says

    ** Top 16 Bits of Multiplication

    I also found the DIV32, however ?

    May I inquire what you were saying, please

    Pete
    Pete

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Ok, maybe we've got different versions of the manual, different sections on different pages...I was referring to Section 4.17, but I'm pulling ALL of this straight from the manual:

    x var word [2] ---- space between 'word' and '[2]' doesn't work.

    ADCIN 6,x ---- this might work, if you set the configuration and defines correctly, which I don't see.

    x = x*2923-1343923
    ---this won't work at all. For one thing, 'x' can't be any larger than 22 at the start of the operation because it'll be over the 16 bit limit. 1,343,923 is actually a 21 bit number. PBP only operates on 16 bit numbers. You might be wanting to do a 16x16=32bit number multiply operation, but you aren't going to do it with a '*'. And even if you did use it correctly, you couldn't subtract 1,343,923 from the result because, again, 1,343,923 is a number that can't be held in 16 bits.

    x1 = div32 1000 --- inconsistent usage with the correct way of using it

    assembly says value truncated
    it only allows to max ~63000 ----- because PBP doesn't deal with numbers larger than 16 bits (65535)...

Similar Threads

  1. Replies: 4
    Last Post: - 15th April 2009, 01:54
  2. store/display very large numbers (700000)
    By ttease in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th March 2007, 22:08
  3. Multiplying large numbers
    By jhonea1 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 14th April 2006, 17:41
  4. How to display large numbers
    By Peter1960 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 26th March 2006, 23:17
  5. math problems - large numbers
    By Tomasm in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 16th February 2004, 07:48

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