The way i convert to BCD is as follows. Note: this may not be most efficient but it works. Also, this is to convert an 8bit into three BCD digits, but its easily expandable Start by subtracting 100 from your value. If result is negative, stop, else increment 100's counter and loop Next subtract 10. If result is negative stop. else increment 10's counter and loop Whats left is the units digit. ------------------------------------------------------------------------------ A member of the PI-100 Club: 3.1415926535897932384626433832795028841971693993751 058209749445923078164062862089986280348253421170679 On Fri, 4 Jun 1999, Gabriel Gonzalez wrote: > Hi, > > several months ago I remember seeing a nice'n'tight little routine to > convert a 16 bit binary number to BCD. > > Can anybody post a similar one for a 24 bit number? > > This will be great help. > > TIA > > Gabriel >