4 ms·
If he's in base 100 and you multiply by 18 it's the same story: you are now in base 1000 and need a division to go back. Converting from binary to BCD also nee
by bonzini 6y ago
If he's in base 100 and you multiply by 18 it's the same story: you are now in base 1000 and need a division to go back.
Converting from binary to BCD also needs division by constants, so again it's more or less the same.
- phire 6y agoOh, right. I'm an idiot who forgot about the fixed point divide. And yes, at some point you are going to need to do a divide by constant 10. It's unavoidable if you want a base 10 display. The option of using BCD to do calculations just lets you do that divide upfront, rather than at the end.