I am working on a project to calculate gcd of two 32bit number in 16bit arithmetic assembly. So, how can I split a string containing a 32bit number into two 16bit register?
For example: "1234567891" -> dx=0100 1001 1001 0110 & ax=0000 0010 1101 0011
I am working on a project to calculate gcd of two 32bit number in 16bit arithmetic assembly. So, how can I split a string containing a 32bit number into two 16bit register?
For example: "1234567891" -> dx=0100 1001 1001 0110 & ax=0000 0010 1101 0011
You'll need to look at using something called arbitrary precision. Its quite a common process for making calculations on numbers that are larger than a processor may be able to handle.
Have a look at this previous stackoverflow question as it has a good answer to explain how this may be achieved.
Be aware that if you multiply two 32 bit numbers then you may need a 64 bit number to store the result!