Divide with power of 2 without using pow() or / operator by SJ · June 29, 2018 Objective: Given a number n and k, Calculate n / k^{2} without using pow() or / operator. Example: N = 48, k = 4 N/k^{2} = 3 Approach: Bit Manipulation Right shift the number N by k. N = 48 Bit representation: 0 1 1 0 0 0 0 Right shift by k = 4 0 1 1 which is the representation of 3. Java Code:Run This Code Output: Number 48 Divided by 2^4 is: 3 Read about – Left and Right shift operators. Multiply 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:Multiply 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.Convert Infix to Postfix ExpressionEvaluation of Infix expressionsFind the right most set bit of a numberSwap two numbers using Bitwise XOR OperatorCount Set bits in a given NumberShare this:LinkedInGooglePrintTumblrFacebookTwitterEmailRedditLike this:Like Loading...