
20 Chapter 2
it only requires an 8 × 8 multiply and 16 × 16 multiply in its library.
However, this does creates two inefficiencies; one, it wastes two data
memory locations holding values that will always be zero and, two,
it wastes execution cycles on 8 additional bits of multiply which will
always result in a zero.
The more efficient solution is to create a custom 8 × 16 multiply
routine. This saves the 2 data bytes and eliminates the wasted execution
time spent multiplying the always-zero MSB of the 8-bit value. Also,
because the routine can be optimized now to use an 8-bit multiplicand,
the routine will actually use less program memory as ...