Overflow bit?


Closed Thread
Results 1 to 11 of 11

Thread: Overflow bit?

Hybrid View

  1. #1
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Hi, Charles

    IF the result of an addition or multiplication is smaller than one of its terms ... there was an overflow !!!

    an so on ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Euh... lower than the Higher term is probably better IMHO Asumming 1*10, 10*10000, etc
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Talking Probably too hard a working night ...

    Quote Originally Posted by mister_e
    Euh... lower than the Higher term is probably better IMHO Asumming 1*10, 10*10000, etc
    And WHAT's wrong then, Mr Super E ??????????????????????????

    Cheers !!!

    Alain
    Last edited by Acetronics2; - 12th October 2006 at 13:38.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    Makes me wonder why I didn't think of this before!
    Charles Linquist

  5. #5
    Join Date
    Jul 2005
    Posts
    78


    Did you find this post helpful? Yes | No

    Default

    [quote]Makes me wonder why I didn't think of this before!{/quote]

    Actually, I wonder why the authors of PBP didn't think of this in the first place, and set a readable flag that would indicate an overflow/underflow condition.

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Talking Errors in my program ??? IMPOSSIBLE !!!

    Hi, Ernie

    Just because you're supposed to think to everything happening ... and of course because you're an " up to the top " PbP programmer ...

    ...

    Thinking to that ... there's a CARRY BIT that exists in PICS ... I bet 1$ it is not automatically cleared by PbP ( ... ) in an overflow situation.
    Just an idea ...

    regards
    Alain
    Last edited by Acetronics2; - 12th October 2006 at 16:38.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  7. #7
    Join Date
    Jul 2005
    Posts
    78


    Did you find this post helpful? Yes | No

    Default

    I bet 1$ it is not automatically cleared by PBP ( ... ) in an overflow situation.
    Go ahead and bet your dollar. I'm using PBP for software in a human patient connected device. If my device fails to work when it's supposed to that person will die.

    You can bet your buck but I'm not betting someone's life on an undocumented "feature."

    I do code very defensively when using integer math; typically checking inputs for values in the expected range to keep the output from overflowing is sufficient.

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 08:55
  2. How to receive stream of bytes using PIC USART
    By unifoxz in forum mel PIC BASIC Pro
    Replies: 34
    Last Post: - 20th June 2009, 11:38
  3. Sleep Mode
    By Pesticida in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th March 2008, 11:31
  4. PICBasic newbie problem
    By ELCouz in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 12th February 2008, 01:55
  5. USART interrupt not interrupting right
    By Morpheus in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 6th March 2005, 02:07

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