--- Quote Start ---
The rule as I see it is: decimal number * 10/12 => your new radix 12 value
--- Quote End ---
Not quite. In C:
int decval = 1137 ;
radix12 nr12 ;
int i = 0 ;
while ( decval /= 0) {
nr12 = decval % 12 ;
decval -= nr12 ;
decval /= 12 ;
++i ;
}
decval = 1137 will result in nr12[] = { 7 , A , 9 } (7 * 12**2 + A * 12**1 + 9 * 12**0 = 1137)
where 1137 * 10 / 12 gives us 947.5
If you translate the C-code in VHDL you will get confronted with the
mod and the
/ operator generating quite a few dividers (and subtractors) if you keep the conversion combinatorial