Simpler using array of digits, recursive carry function:

```
byte count_digit[4] ;
void increment (byte index = 0)
{
if (index >= 4) // overflow top digit
return ;
if (count_digit[index] == 9)
{
count_digit[index] = 0;
increment (index+1) ;
}
else
count_digit[index] ++ ;
}
// then to increment by one, call "increment()"
```

For fastest decode of int to decimal digits divide and conquer:

```
void decode_digits (unsigned int value)
{
high_part = value / 100 ;
low_part = value - 100 * high_part ; // split into two small problems
thousands = high_part / 10 ;
hundreds = high_part - 10 * thousands ;
tens = low_part / 10 ;
units = low_part - 10 * tens ;
```

Note only 3 divisions, no remainders, and multiplies are done in hardware anyway, and the smaller
divides can be done with table lookup if required for ultimate performance, leaving a single divide by 100.