Exponentiation | Sololearn: Learn to code for FREE!



How do I calculate raising powers in maths? 2××7

1/18/2022 1:39:20 AM


6 Answers

New Answer


Calculating raising power is as simple as multiplying the base number itself. 2⁷ = 2×2×2×2×2×2×2


You can write it as:- 2**7 In Python.


In which language?


** sign indiacating power in python You write in python code Print(2**7) And you get 128 in output


+ is for addition - is for subtraction * is for multiplication ** is for exponential / is for exact division // is for quotient % is for remainder You can see others on internet


biodun if you mean specifically to use base 2 with a positive integer power, then the fastest way is to left shift a 1 bit. The bitwise left shift operator << is almost universal in computer languages. 2^n = 1<<n