One possible performance enhancement is to do a shift and add instead of an actual multiplication. Since 9 X 6, for exam
Posted: Wed Mar 30, 2022 9:28 am
One possible performance enhancement is to do a shift and add instead of an actual multiplication. Since 9 X 6, for example, can be written (2 X 2 X 2 + 1) X 6, we can calculate 9 X 6 by shifting 6 to the left 3 times and then adding 6 to that result. Show the best way to calculate (0*35) X (0x57) using shifts and adds/subtracts. Assume both inputs are 8-bit unsigned integers.