There have been many, many threads on the Forum on binary-to-decimal conversion, usually for purposes of creating ASCII character representations of numbers for display.
Some of the common themes include the surprise at the size of programs containing printf(); complaints about size and/or speed of alternatives such as itoa(); and just lack of basic knowledge on the subject.
With different types of displays, and differing display requirements (sometimes I want to inject an inplied decimal port; sometimes I need utoa() for full 16 bits instead of 15; etc.) I'm always searching for the "ultimate method".
Well, I came across a reference that is detailed enough for the purists and also straightforward enough for the beginnners:
http://www.cs.uiowa.edu/~jones/b...
Binary to Decimal Conversion in Limited Precision
Part of the Arithmetic Tutorial Collection
by Douglas W. Jones
THE UNIVERSITY OF IOWA Department of Computer ScienceCopyright © 1999, Douglas. W. Jones, with major revisions mad e in 2002. This work may be transmitted or stored in electronic form on any computer attached to the Internet or World Wide Web so long as this notice is included in the copy. Individuals may make single copies for their own use. All other rights are reserved.
I >>knew<< there had to be bettter methods than the straightforward subtraction of powers of 10, and faster methods than the elegant recursive solution (which HAS to be the smallest flash consumer). This article will give all of us something to think about. I'm looking forward to exploring more items in the "collection" now that I've found it.
Lee