Problem
Multiply an integer by using only bit shifts and a single subtraction (no * operator, no loops).
Generalise: how would you multiply by any constant using shifts and adds/subtracts?
Multiply an integer by using only bit shifts and a single subtraction (no * operator, no loops).
Generalise: how would you multiply by any constant using shifts and adds/subtracts?