Could you elaborate a little more on your comment? I don't quite understand what you mean... I take my origional number between 0 & 255, lets say 100 convert it to binary 0110 0100 Choose a number to divide by ok 10, convert to binary 0000 1010 turn it into two bytes 0110 0100 0000 1010 swap nibbles 0000 0100 convert back to decimal 4 I must have missed something here.... For such a simple well defined case, what about using BCD? I haven't looked at the archives but why not take the original number, turn it into BCD in two bytes and return the lower nibble of the upper byte and the upper nibble of lower byte as a one byte BCD answer which is then turned back into a normal number? And of course a 9999 EOF marker. :-) chuckc > For example, I have a number between 0 and 255 and I want to know how many > times 10 can be divided into the number. > Is there a simple way to achieve this? -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body