Ok... I feel foolish. The Binary-to-BCD code I posted works only on inputs from 0 to 999. Notwithstanding the accompanying documentation, it does NOT work on numbers between 1000 and 1285. It will still solve the problem for which it was written; the guy who originally asked for a binary-to-BCD converter needed a range of only [0-999]. Many thanks to David Tait, who not only discovered the [0-999] limit within a couple of hours of my posting the code, but graciously refrained from calling me an idiot even after I insisted that the code worked for numbers greater than 999. -Andy -- Andrew Warren - fastfwd@ix.netcom.com Fast Forward Engineering, Vista, California