View Single Post
  #1  
Old October 16th, 2008, 07:28 PM
i_heart_pandas i_heart_pandas is offline
Newbie
 
Join Date: Oct 2008
Posts: 2
Country:
Thanks: 0
Thanked 0 Times in 0 Posts
i_heart_pandas is on a distinguished road
Default perform basic operations on large numbers algorithm?

is there such an algorithm for doing something like add a large integral numbers in sections?

the reason i ask is in computer science numbers can't be bigger than 2^32, so to emulate operations of a number of 2^256 you have to calcuate it doing many smaller calculations.

now i know that to mulitply two large(positive) numbers you can put them in a box, say 153 * 86 can be represented as (100*80)+(100*6)+(50*80)+(50*6)+(3*80)+(3*6) which is the only idea i have to work this out

basically the result of a small calcuation can't result in a number −2,147,483,648 to +2,147,483,647 (-2^31 to 2^31)

so i guess all calcuations should be done with two numbers below 2^16 so that the outcome can't be greater than 2^32

any help would be apprecitated, this isn't homework or anything just trying to write something?

thanks for your time
Reply With Quote