Ask Question

4-One possible performance multiplication enhancement is to do a shift and add instead of an actual multiplication. Since 9 * 6, for example, can be written (2 * 2 * 2 + 1) * 6, we can calculate 9 * 6 by shifting 6 to the left 3 times and then adding 6 to that result. Show the best way to calculate 13 * 7 using shifts and adds/subtracts. Assume both inputs are 8-bit unsigned integers.

+2
Answers (1)
  1. 15 March, 19:31
    0
    Check the explanation

    Explanation:

    The above question can be sovled in the below step by step way:

    15 can be written as 16-1 = 24 - 1

    Therefore, 15 * 13 = (24 - 1) * 13

    = 13*24 - 13

    Now, when we left shift a number we multiply it by 2k. Where k is no of times we left shifted it.

    Therefore, 13*24 = shift 13 to left 4 times

    15 * 13 = shift 13 to left 4 times and subtract 13 from it.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “4-One possible performance multiplication enhancement is to do a shift and add instead of an actual multiplication. Since 9 * 6, for ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers