If I understand correctly (I haven't looked at the code), this is the right answer. 1/8 => How many times does 8 go into 1 (0) 1%8 (mod or remainder)=> How many are left over after 8 goes into 1 as many times as possible (1) Nick ----- Original Message ----- From: "Mike" To: Sent: Wednesday, November 26, 2003 10:51 AM Subject: [PICLIST] [PIC]: Nikolia's 24/16 -> 24 bit divide v3 > Hi: > > I tried this code at > > http://www.piclist.com/techref/microchip/math/div/24by16.htm > > I used the last (3rd) routine on the page. > > When I divide 1 by 8 or 1 by 7, etc., I always get a remainder of 1 instead of 2 or 3, > eic. > > What's up with that? Does this happen to others using the same code or did I foul > something up? I've checked my code 3 times, but before I cry bug, I'd like a confirm. > > Er, looks like the comments wrapped so, sorry, I won't waste bandwidth posting the > code here. Just remember, it's the 3rd divide routine on the page. > > TIA, > Mike > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body