algorithms.tutorialhorizon.com
Multiply with power of 2 without using pow() or * operator - published | Algorithms
Objective: Given a number n and k, Calculate n * k2 without using pow() or * operator. Example: N = 3, k = 4 N*k2 = 48 Approach: Bit Manipulation Left shift the number N by k.