flat assembler
Message board for the users of flat assembler.

 Index > DOS > Arithmetic with big numbers
Author
 Thread
alexa

Joined: 21 Apr 2006
Posts: 8
alexa 22 Apr 2006, 08:02
How write arithmetic operation(addition,subtraction,multiple,divide,modulo) for big numbers?(length operand more than 2048 bit)
22 Apr 2006, 08:02
vid
Verbosity in development

Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 22 Apr 2006, 09:27
addition and subtraction are simple, look at adc and sbb instructions. multiplying is harder, there are few common algos how to do it. and dividing is hell. modulo is if course dividee - divider*(dividee / divider), wher "/" is ours whole-number division without remainder
22 Apr 2006, 09:27
Borsuc

Joined: 29 Dec 2005
Posts: 2465
Location: Bucharest, Romania
Borsuc 22 Apr 2006, 09:32
I'm also a bit interested in doing manual multiplication and division. vid, do you know some links around. that would be very helpful. thanks in advance
22 Apr 2006, 09:32
vid
Verbosity in development

Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 22 Apr 2006, 12:40
22 Apr 2006, 12:40
Madis731

Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 22 Apr 2006, 13:52
My program can do multiplications rather quickly, but its main purpose is powers like "1234 to the power of 5678". I started to look on the subject of Fourier Transforming the results, but no success, I just don't get it
Check out the Projects section for the program.
22 Apr 2006, 13:52
vid
Verbosity in development

Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 23 Apr 2006, 21:04
yes, FT is pretty complicated to comprehend, until you comprehend it
23 Apr 2006, 21:04
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

 Jump to: Select a forum Official----------------AssemblyPeripheria General----------------MainTutorials and ExamplesDOSWindowsLinuxUnixMenuetOS Specific----------------MacroinstructionsOS ConstructionIDE DevelopmentProjects and IdeasNon-x86 architecturesHigh Level LanguagesProgramming Language DesignCompiler Internals Other----------------FeedbackHeapTest Area

Forum Rules:
 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum

Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.