ASM Newbie Question: 10/6 Byte Division

  • Thread starter Thread starter Brazilian Fan
  • Start date Start date
  • Tags Tags
    Division
AI Thread Summary
To divide a 10 by 6 byte number using assembly language, one approach is to apply long division, similar to the method taught in grade school. This is necessary because the DIV or IDIV opcode is limited to handling 8 by 4 byte divisions. Extended precision math can complicate the process, and resources such as Apfloat provide documentation and source code to assist with these calculations.
Brazilian Fan
Messages
2
Reaction score
0
Hi, I am new here and I got a newbie ASM Question:

How to divide, say, a 10 by 6 bytes number if the DIV (or IDIV) opcode only supports a 8 by 4 Bytes division?

Thanks in advance
 
Last edited:
Technology news on Phys.org
One way would be to simply use the same algorithm you used in grade-school for long division.

- Warren
 
Extended precision math can get tricky. Here's a link to a website that includes source and documentation:

http://www.apfloat.org
 
Thanks for the help :smile:
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Back
Top