Binary Math Tricks: Shifting to Divide by Ten Ain’t Easy

On small CPUs, you often don’t have a multiply or divide instruction. Of course, good programmers know that shifting right and left will multiply or divide by a power of two. But there are always cases where you need to use something that isn’t a power of two. Sometimes you …read more

Continue reading Binary Math Tricks: Shifting to Divide by Ten Ain’t Easy