+ 2
Exponentiation
How do I calculate raising powers in maths? 2ĂĂ7
6 Answers
+ 6
Calculating raising power is as simple as multiplying the base number itself.
2â· = 2Ă2Ă2Ă2Ă2Ă2Ă2
+ 3
You can write it as:-
2**7 In Python.
+ 2
** sign indiacating power in python
You write in python code
Print(2**7)
And you get 128 in output
+ 2
+ 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
+ 1
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