Multiply with power of 2 without using pow() or * operator by SJ · December 16, 2018 Objective: Given a number n and k, Calculate n * k^{2} without using pow() or *operator. Example: N = 3, k = 4 N*k^{2} = 48 Approach: Bit Manipulation Left shift the number N by k. For example, N = 3 Bit representation: 0 1 1 Left shift by k = 4 0 1 1 0 0 0 0 which is the representation of 48. Java Code: Run This Code Output: Number 3 Multiplied by 2^4 is: 48 Also Read about – Left and Right shift operators.Divide with power of 2 without using pow() or /operator __________________________________________________ Top Companies Interview Questions..- Google Microsoft Amazon Facebook more.. If you find anything incorrect or you feel that there is any better approach to solve the above problem, please write comment. __________________________________________________ Related Posts:Divide with power of 2 without using pow() or / operatorLeft Shift () OperatorsNumber of 1’s in bit representation of a numberFind remainder without using modulo operatorCheck if Given Number is power of 2.Swap two numbers using Bitwise XOR OperatorFind the right most set bit of a numberFind the right most unset bit OR zero bit of a numberConvert Number to base 3 String RepresentationAlgorithm to calculate power(k,n).Share this:LinkedInGooglePrintTumblrFacebookTwitterEmailRedditLike this:Like Loading...