How to understand "divide two 16 bits number in 8051 microcontroller"?

OP (Company: KUKE Electronics CO., Limited) #6694333
Rate this post
• ▲ useful
▼ not useful
Hi all,
I have this project to code in 8051: "Division of two 16 bit unsigned 
integers being in the internal memory, quotient and remainder should be 
stored".
I find a way to do it but there is a part of the program that i don't 
understand, I attach it.
I've noted which part i don't understand. By "don't understand", means 
that i'm not understanding why do we have to do all those calculations 
to find the quotient and the remainder.

Is there anyone have ideas of it? Or any advice?
Moderator (Company: Titel) #6750077
Rate this post
• ▲ useful
▼ not useful
Lernend B. wrote:
> I've noted which part i don't understand.
Be more precise!
Or do you think we should dig through lots of pages of general 
information to find some part you don't understand?

> all those calculations
Which do you mean?

> why do we have to do all those calculations to find the quotient and
> the remainder.
Take a sheet of paper and do this calculation manually, then you see how 
many calculations you must do for a simple division.

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.