3 ms·
You can do it by any number if you toss in addition. If you’re multiplying by a constant, you can factor it out. For example multiply by 40 (coincidentally the
by whartung 3y ago
You can do it by any number if you toss in addition. If you’re multiplying by a constant, you can factor it out.
For example multiply by 40 (coincidentally the number of characters per line on common microcomputers), you could shift to multiply by 32, shift to multiply by 8, and add them together. Took some additional storage but was faster, particularly for 16 bit, than a general routine.