Exponentiation | Sololearn: Learn to code for FREE!

+2

Exponentiation

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

1/18/2022 1:39:20 AM

biodun

6 Answers

New Answer

+5

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

In which language?

+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