EQ #8

The C code below converts an unsigned 16-bit binary number into its decimal equivalent, in packed BCD format. Does this algorithm extend to other sizes of binary numbers?