I think that semantics is rearing its ugly head. I wrote: I thought that my original question was reasonably clear: I=20 specifically mention that I'm starting off with a 12-bit number but=20 eventually wind up with a 9-bit result after scaling. Ideally, I'd=20 like two optimized routines: 9-bit to Decimal and 12-bit to Decimal. I suppose that I should have said "binary" instead of "hex". These are raw (binary) integers - not ASCII. The problem with John Payson's routine is that it get fairly long if=20 the final decimal digits are high-value. That is: a final result of=20 59999 takes far longer to execute than 11111. Was just wondering if there is another (faster) method that works=20 over the range of 0..2047 decimal or 0..511 decimal. Many thanks! dwayne John Payson's routine takes a 16-bit binary (2-digit hex) value and=20 returns the decimal equivalent. I commented that John's routine=20 takes longer to execute when the final decimal output is 59999 as=20 compared to smaller decimal output values. I also specifically mentioned that I'm dealing with binary integers=20 **NOT** ASCII. I'm not sure where the confusion is. dwayne At 11:44 PM 1/17/2018, Ryan O'Connor wrote: >This is confusing because you seem to describe in your most recent reply >that you want a decimal to decimal string (ascii) conversion but the code >you posted does hex to decimal or binary coded decimal conversion. > >Ryan > > > On 1/17/2018 6:32 PM, Dwayne Reid wrote: > > > Was just wondering if there is another (faster) > > > method that works over the range of 0..2047 decimal or 0..511 decimal= .. --=20 Dwayne Reid Trinity Electronics Systems Ltd Edmonton, AB, CANADA 780-489-3199 voice 780-487-6397 fax 888-489-3199 Toll Free www.trinity-electronics.com Custom Electronics Design and Manufacturing --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .