One possible performance enhancement is to do a shift and add instead of an actual multiplication. Since 9 X 6, for exam
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
One possible performance enhancement is to do a shift and add instead of an actual multiplication. Since 9 X 6, for exam
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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!