> > I need to implement the following equation in a 16F876. > > RESULT = (255 / A) * B > > A and B are bytes (each have possible values of 01 to FF) > > RESULT is a word (unsigned) for a timer routine counter. Rearrange your expression to: B*255 / A Now computing B*255 is very easy. Just treat it as B*256 - B This will give you a 16 bit result. Then use a 16 divided by 8 giving 16 routine for the division. Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu