Answer the question
In order to leave comments, you need to log in
How to operate with numbers that are higher than the maximum possible?
Good day!
For example, Microsoft created a calculator for their Windows, which back in the 90s could add, multiply and divide huge numbers, much higher than maxlongint. Now, of course, he can do the same. Perhaps today the limit of the allowed number has grown (especially on 64 systems), but in the 90s this limit was very explicit.
How did Microsoft manage to implement this, because processors have (were) serious limitations in terms of processing numbers? As far as I've heard, the calculator's sources are still closed.
Answer the question
In order to leave comments, you need to log in
long arithmetic.
In short: store the number as an array, where each element is a digit of the number, and handle all operations manually.
At school, everyone is taught to add, divide and multiply in a "column". This method has no bit depth restrictions.
The processor has only one limitation in terms of processing numbers - the calculation time. For example, the RSA algorithm uses 500-1000 bit primes.
Do you have any idea what a 500 bit number is?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question