Saint Pingla (The Computer Scientist)

Binary Numbers and computational science

Binary numbers is the basic language in which computer programs are written. Binary means a set of two The combination of these numbers are called bits and bytes. These set of numbers are zero and one, which are used in writing computer program. There is, till date, no other way in which computer program can be written. German mathematician Gottfried Leibniz discovered binary numbers in the west in 1695. However, there is significant evidence that binary numbers were in use in India in about 2nd century A.D., more than 1500 years earlier than their discovery in the west.

Ancient Indian sages were scholars of very high order, but they did not give their inner realisations, the name of science, but laws of nature ordained by God. During long foreign rule, hostile to India’s culture and civilisation, a vast body of scientific information created by India’s sages was lost. However much of the scholarly work done by our sages in south India survived and preserved due to the reason that that part our country was free of foreign invasion for a long time. We need to rediscover the forgotten contributions of ancient India in the field of science. One of these discoveries is that of the use of Binary numbers for the classification of musical meters.

A treatise on music by Pingala named "Chhandahshastra" meaning science of meters is the origin of this finding. This text is in the form of "Sutra" or aphorism. Detailed analysis of these discoveries is found in later commentaries. "Chhandahshastra" can be approximately dated to 2nd century A.D. The main commentaries on "Chhandahshastra" are "Vrittaratnakara" by Kedara in probably 8th century, "Tatparyatika" by Trivikrama in 12th century and "Mritasanjivani" by Halayudha in 13th century. The full significance of Pingala's work can be understood by the explanations found in these three commentaries.

Pingala (Chhandahshastra 8.23) has assigned the following combinations of zero and one to represent various numbers, much in the same way as the present day computer programming procedures.

0 0 0 0 numerical value 1

1 0 0 0 numerical value 2

0 1 0 0 numerical value 3

1 1 0 0 numerical value 4

0 0 1 0 numerical value 5

1 0 1 0 numerical value 6

0 1 1 0 numerical value 7

1 1 1 0 numerical value 8

0 0 0 1 numerical value 9

1 0 0 1 numerical value 10

0 1 0 1 numerical value 11

1 1 0 1 numerical value 12

0 0 1 1 numerical value 13

1 0 1 1 numerical value 14

0 1 1 1 numerical value 15

1 1 1 1 numerical value 16

Other numbers and alphabets have also been assigned zero and one combinations likewise, in the Pingala system:

Pingala's system of binary numbers starts with number one (and not zero). The numerical value is obtained by adding one to the sum of place values. In this system, the place value increases to the right, as against the modern notation in which it increases towards the left. The procedure of Pingala system is as follows:

1. Divide the number by two. If divisible write one, otherwise write zero.

2. If first division yields 1 as remainder, add 1and divide again by two. If fully divisible, write one, otherwise write zero to the right of first one.

3. If first division yields zero as remainder that is, it is fully divisible, add one to the remaining number and divide by two. If divisible, write one, otherwise write zero to the right of first zero.

4. This procedure is continued until zero as final remainder is obtained.

Following example to understand this procedure is given below.

Let us find the binary equivalent of number 126.

Step 1: Divide by two. Divisible, so write one. Remaining number is 63.

1

Step 2: Divide number 63 by 2.Not divisible, so write 0 to the right.

10

Step 3: Add 1 to 63 and divide by 2-.Remaining number is 32.

Step 4: Divide 32 by 2.Divisible, so write 1 to the right. Remainder is 16.

101

Step 5: Divide 16 by 2.Divisible, so write 1 to the right. Remainder is 8.

1011

Step 6: Divide 8 by 2.Divisible, so write 1 to the right. Remainder is 4.

10111

Step 7: Divide 4 by 2 .Divisible, So write 1 to the right. Remainder is 2.

101111

Step 8: Divide 2 by 2. Divisible, so write 1 to the right. The reminder is now finally 0, hence the process terminates.

1011111

Hence the binary equivalent of number 126 is 1011111

Now we can cross-check the correctness of this procedure as follows, by using place value system.

1*1+0*2 1*4 1*8 1*16 1*32 1*64

=1 0 4 8 16 32 64 = 125

By adding 1 to 125, we get 126; the number we started with, that is to say in computer machine language, in Pingala system, we will write number 126 as 1011111.

By applying the above method, binary equivalent of any number can be calculated.

Hence Pingala’s binary system is correct, having been invented about 1900 years ago which was invented by the western scientist 1600 years later.

Pingala (Chhandahshastra 8.24-25) also describes the method to find the binary equivalent of a decimal number.

A treatise on music by Pingala named "Chhandahshastra" meaning science of meters is the origin of this finding. This text is in the form of "Sutra" or aphorism. Detailed analysis of these discoveries is found in later commentaries. "Chhandahshastra" can be approximately dated to 2nd century A.D. The main commentaries on "Chhandahshastra" are "Vrittaratnakara" by Kedara in probably 8th century, "Tatparyatika" by Trivikrama in 12th century and "Mritasanjivani" by Halayudha in 13th century. The full significance of Pingala's work can be understood by the explanations found in these three commentaries.

Pingala (Chhandahshastra 8.23) has assigned the following combinations of zero and one to represent various numbers, much in the same way as the present day computer programming procedures.

0 0 0 0 numerical value 1

1 0 0 0 numerical value 2

0 1 0 0 numerical value 3

1 1 0 0 numerical value 4

0 0 1 0 numerical value 5

1 0 1 0 numerical value 6

0 1 1 0 numerical value 7

1 1 1 0 numerical value 8

0 0 0 1 numerical value 9

1 0 0 1 numerical value 10

0 1 0 1 numerical value 11

1 1 0 1 numerical value 12

0 0 1 1 numerical value 13

1 0 1 1 numerical value 14

0 1 1 1 numerical value 15

1 1 1 1 numerical value 16

Other numbers and alphabets have also been assigned zero and one combinations likewise, in the Pingala system:

Pingala's system of binary numbers starts with number one (and not zero). The numerical value is obtained by adding one to the sum of place values. In this system, the place value increases to the right, as against the modern notation in which it increases towards the left. The procedure of Pingala system is as follows:

1. Divide the number by two. If divisible write one, otherwise write zero.

2. If first division yields 1 as remainder, add 1and divide again by two. If fully divisible, write one, otherwise write zero to the right of first one.

3. If first division yields zero as remainder that is, it is fully divisible, add one to the remaining number and divide by two. If divisible, write one, otherwise write zero to the right of first zero.

4. This procedure is continued until zero as final remainder is obtained.

Following example to understand this procedure is given below.

Let us find the binary equivalent of number 126.

Step 1: Divide by two. Divisible, so write one. Remaining number is 63.

1

Step 2: Divide number 63 by 2.Not divisible, so write 0 to the right.

10

Step 3: Add 1 to 63 and divide by 2-.Remaining number is 32.

Step 4: Divide 32 by 2.Divisible, so write 1 to the right. Remainder is 16.

101

Step 5: Divide 16 by 2.Divisible, so write 1 to the right. Remainder is 8.

1011

Step 6: Divide 8 by 2.Divisible, so write 1 to the right. Remainder is 4.

10111

Step 7: Divide 4 by 2 .Divisible, So write 1 to the right. Remainder is 2.

101111

Step 8: Divide 2 by 2. Divisible, so write 1 to the right. The reminder is now finally 0, hence the process terminates.

1011111

Hence the binary equivalent of number 126 is 1011111

Now we can cross-check the correctness of this procedure as follows, by using place value system.

1*1+0*2 1*4 1*8 1*16 1*32 1*64

=1 0 4 8 16 32 64 = 125

By adding 1 to 125, we get 126; the number we started with, that is to say in computer machine language, in Pingala system, we will write number 126 as 1011111.

By applying the above method, binary equivalent of any number can be calculated.

Hence Pingala’s binary system is correct, having been invented about 1900 years ago which was invented by the western scientist 1600 years later.

Pingala (Chhandahshastra 8.24-25) also describes the method to find the binary equivalent of a decimal number.