Modular Exponentiation with Example, Finding Final digit and final two digits in given number.

 Modular Exponentiation:

Definition: Modular exponentiation is the process of repeatedly squaring and reducing a number modulo some integer, and then combining the results to find the required answer.

Modulo refers to the act of finding the remainder when a certain number is divided by another.

For examples:

5 Modulo 3 is 2. The use of this operation will be in algorithm which uses divisibility, most simply, finding whether a number is odd or even.

Exponentiation is simple raising a number to a certain power

52=25.


Module and exponentiation are both mathematics terms, nothing related to IT field. However, your script may use this logic.

C=be(Mod m), where e exponent, m is modules.

To find final digit and two final digits, use modular Exponentiation method:

Universe Method:

Modular Exponentiation is a Universe method to find last digits. Use following option:

1. To find last digit use Modulo 10

2. To find last two digits use Modulo 100

3. To find last three digits use Modulo 1000 and etc


Example - 1:

What is the last digits of 782?

Solution:

Now, number 78 deviation from 10(Universe Method-1). So we can write

= 782 Mod 10

= 6084 Mod 10

= 6084/10   here remainder is 4

= 4    

4 will be the last digit.


Example - 2

What are the last two digits of 782?

Solution:

Now, number 78 deviation from 100 (Universe Method-2). So we can write

= 782 Mod 100

= 6084 Mod 100

= 6084/10   here remainder is 84

= 84    

84 will be the last two digits.


Example - 3

What are the last two digits of 3100?

Solution:

The basic things required to answer this kind of question is that you must have a good knowledge of Modulo theorem, addition, multiplication, division and subtraction. 

When ever a number is divided by 10 we will get the units digits, if divided by 100 we will get the last two digits i.e., units and tenth. If divided by 1000 we will get the last 3 digits of the number i.e., units, tenth and hundredth digit of the number and so on.


Now how to divide 3100 with 100 using modulo method. 

So we can write.

= 3100 Mod 100

= ((310 Mod 100) (310 Mod 100) (310 Mod 100) (310 Mod 100) (310 Mod 100) (310 Mod 100) (310 Mod 100) (310 Mod 100) (310 Mod 100) (310 Mod 100)) Mod 100

First find out answer for (310 Mod 100) = 49. Now multiply 10 times

= (49 * 49 * 49 * 49 * 49 * 49 * 49 * 49 * 49 * 49) Mod 100

= 01  

The remainder when 3100 mod 100 is same as when 1/100 which is 01.      

Therefore the answer is 01.


Example - 4

What are the last two digits of 31000?

Solution:

The basic things required to answer this kind of question is that you must have a good knowledge of Modulo theorem, addition, multiplication, division and subtraction. 

When ever a number is divided by 10 we will get the units digits, if divided by 100 we will get the last two digits i.e., units and tenth. If divided by 1000 we will get the last 3 digits of the number i.e., units, tenth and hundredth digit of the number and so on.


Now how to divide 31000 with 100 using modulo method. 

So we can write.

= 31000 Mod 100

= ((3100 Mod 100) (3100 Mod 100) (3100 Mod 100) (3100 Mod 100) (3100 Mod 100) (3100 Mod 100) (3100 Mod 100) (3100 Mod 100) (3100 Mod 100) (3100 Mod 100)) Mod 100

First find out answer for (310 Mod 100) = 49. Now multiply 10 and divide by 100 times you will get 3100 is 01.

= (01 * 01 * 01 * 01 * 01 * 01 * 01 * 01 * 01 * 01) Mod 100

= 01  

The remainder when 31000 mod 100 is same as when 1/100 which is 01.      

Therefore the answer is 01.


Example - 5

What are the last two digits of 781?

Solution:

The basic things required to answer this kind of question is that you must have a good knowledge of Modulo theorem, addition, multiplication, division and subtraction. 

When ever a number is divided by 10 we will get the units digits, if divided by 100 we will get the last two digits i.e., units and tenth. If divided by 1000 we will get the last 3 digits of the number i.e., units, tenth and hundredth digit of the number and so on.


Now how to divide 781 with 100 using modulo method. 

So we can write.

= 781 Mod 100

= ((710 Mod 100) (710 Mod 100) (710 Mod 100) (710 Mod 100) (710 Mod 100) (710 Mod 100) (710 Mod 100) (710 Mod 100) (71 Mod 100)) Mod 100

First find out answer for (710 Mod 100) = 49. Now multiply 8 and divide by 100.

= (49* 49 * 49 * 49 * 49 * 49 * 49 * 49 * 7) Mod 100

= 07  

The remainder when 781 mod 100 is same as when 7/100 which is 07.      

Therefore the answer is 07.


Example - 6

What are the last two digits of 3176?

Solution:

The basic things required to answer this kind of question is that you must have a good knowledge of Modulo theorem, addition, multiplication, division and subtraction. 

When ever a number is divided by 10 we will get the units digits, if divided by 100 we will get the last two digits i.e., units and tenth. If divided by 1000 we will get the last 3 digits of the number i.e., units, tenth and hundredth digit of the number and so on.


Now how to divide 3176 with 100 using modulo method. 

So we can write.

= 3176 Mod 100

= ((3110 Mod 100) (3110 Mod 100) (3110 Mod 100) (3110 Mod 100) (3110 Mod 100) (3110 Mod 100) (3110 Mod 100) (316 Mod 100)) Mod 100

First find out answer for (3110 Mod 100) = 01 and (3110 Mod 100)=81.

= (01* 01 * 01 * 01 * 01 * 01 * 01 * 81) Mod 100

= 81  

The remainder when 3176 mod 100 is same as when 81/100 which is 81.      

Therefore the answer is 81.


Example - 7

What are the last two digits of 135123?

Solution:

The basic things required to answer this kind of question is that you must have a good knowledge of Modulo theorem, addition, multiplication, division and subtraction. 

When ever a number is divided by 10 we will get the units digits, if divided by 100 we will get the last two digits i.e., units and tenth. If divided by 1000 we will get the last 3 digits of the number i.e., units, tenth and hundredth digit of the number and so on.


Now how to divide 135123 with 100 using modulo method. 

So we can write.

= 135123 Mod 100

= ((13510 Mod 100) (13510 Mod 100) (13510 Mod 100) (13510 Mod 100) (13510 Mod 100) (13510 Mod 100) (13510 Mod 100) (13510 Mod 100) (13510 Mod 100) (13510 Mod 100) (13510 Mod 100) (13510 Mod 100) (1353 Mod 100)) Mod 100

First find out answer for (13510 Mod 100) = 25 and (1353 Mod 100)=75.

= (25 * 25 * 25 * 25 * 25 * 25 * 25 * 25 * 25 * 25 * 25 * 25 * 75) Mod 100

= 75  

The remainder when 135123 mod 100 is same as when 75/100 which is 75.      

Therefore the answer is 75.


Example - 8

What are the last two digits of 32019?

Solution:

The basic things required to answer this kind of question is that you must have a good knowledge of Modulo theorem, addition, multiplication, division and subtraction. 

When ever a number is divided by 10 we will get the units digits, if divided by 100 we will get the last two digits i.e., units and tenth. If divided by 1000 we will get the last 3 digits of the number i.e., units, tenth and hundredth digit of the number and so on.


Now how to divide 32019 with 100 using modulo method. 

So we can write.

= 32019 Mod 100

= ((3500 Mod 100) (3500 Mod 100) (3500 Mod 100) (3500 Mod 100) (319 Mod 100)) Mod 100

First find out answer for (3500 Mod 100) = 01 and (319 Mod 100)=67.

= (01 * 67) Mod 100

= 67  

The remainder when 32019 mod 100 is same as when 67/100 which is 67.      

Therefore the answer is 67.


Example - 9

What are the last two digits of 21997?

Solution:

The basic things required to answer this kind of question is that you must have a good knowledge of Modulo theorem, addition, multiplication, division and subtraction. 

Whenever a number is divided by 10 we will get the units digits, if divided by 100 we will get the last two digits i.e., units and tenth. If divided by 1000 we will get the last 3 digits of the number i.e., units, tenth and hundredth digit of the number and so on.


Now how to divide 21997 with 100 using modulo method. 

So we can write.

= 21997 Mod 100

= ((2500 Mod 100) (2500 Mod 100) (2500 Mod 100) (2400 Mod 100) (297 Mod 100)) Mod 100

First find out answer for (2500 Mod 100) = 76,  (2400 Mod 100)=76 and 

(297 Mod 100)=72.

= (76 * 76 * 72) Mod 100

= 72 

The remainder when 21997 mod 100 is same as when 72/100 which is 72.      

Therefore the answer is 72.


Example - 10

What are the last two digits of 1681057?

Solution:

The basic things required to answer this kind of question is that you must have a good knowledge of Modulo theorem, addition, multiplication, division and subtraction. 

Whenever a number is divided by 10 we will get the units digits, if divided by 100 we will get the last two digits i.e., units and tenth. If divided by 1000 we will get the last 3 digits of the number i.e., units, tenth and hundredth digit of the number and so on.


Now how to divide 1681057 with 100 using modulo method. 

So we can write.

= 1681057 Mod 100

= ((168500 Mod 100) (168500 Mod 100) (16857 Mod 100)) Mod 100

First find out answer for (168500 Mod 100) = 76,  (16857 Mod 100)=68.

= (76 * 76 * 68) Mod 100

= 68 

The remainder when 1681057 mod 100 is same as when 68/100 which is 68.      

Therefore the answer is 68.


If you need more examples, kindly drop a messages in comment section. 

Thank you.




Comments

Popular posts from this blog

RSA Algorithm With Examples

RSA DIGITAL SIGNATURE ALGORITHM WITH SOLVED EXAMPLES