Menu

Multiplying large numbers.

Help
Mauried
2010-06-05
2013-05-30
  • Mauried

    Mauried - 2010-06-05

    Has anyone been able to do this sort of calculation in GCbasic.
    Multiply 2 word numbers and then divide them by a byte number.
    The multiplication can at times exceed 16 bits, but the result will always fit in 16 bits.
    The project its for , a MPPT Solar battery Charger, needs good math resolution so I cant
    solve the problem by dividing the word numbers first before the multiplication.
    With the existing 16 bit multiply routines, is it possible to detect when bit overflow occurs, as if so
    I can start to look at making a routine to store the result in 2 16 bit words.
    Tnx

     
  • Nobody/Anonymous

    Hi ,

    If you want , I have some 32 bits maths calculations : 16 x 16 with 32 bits result and 32 / 8 with 32 bits result  ( because 32 bits /1 = 32 bits result )  , and  a 32 bits LCD decimal displaying !
    I don't know if they are the betters and fasters calculations but the results are fast and perfect .They could be efficient for any microcontroller  . I tried them on Atmega's and PIC's with LCD display  without any problem .

    Because they are too long to post them here , send me  your e-mail at :    gerard_ch@hotmail.fr    and I'll send this 3 files .
    I hope you can translate French language because remarks aren't in english …
    I have another  text I can join with them including add32 , Sub32 , div24_16 , ….

    Regards
    GC

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.