Acharya Pingala! The great mathematician who was first to put binary system to use

Ancient Indians used Mathematics extensively and relied on it so heavily that Indian Logic, Philosophy,Hindu Rituals and the Sanskrit Language have strong Mathematical base.

Meters, called Chandas are used in Prayers, literary works have a strict Mathematical base.

Pingala, younger brother of Panini, the Sanskrit grammarian, has devised Chandah Shastra that deals with these Meters.

He  is said to have lived around 400-200 BC, may be earlier.

Another Legend has it that he is the younger brother of Patanjali, who wrote the Yoga Sutra.

This assigns Pinagala to 4th century BC.

The Chandah shastra presents the first known description of a binary numeral system in connection with the systematic enumeration of chandas with fixed patterns of laghu and guru syllables.

Halayudha who wrote a commentary on Pingala’s work, includes a presentation of the Pascal’s triangle(called meruprastara). Pingala’s work also contains the Fibonacci numbers, called matrameru.

In Europe, a rediscovery of the binary notation, in a slightly different form, was made by Gottfried Leibniz (1646–1716) at the end of the seventeenth century.

Use of zero is sometimes mistakenly attributed to Pingala due to his discussion of binary numbers, usually represented using 0 and 1 in modern discussion. But Pingala used laghu and guru syllables. And Pingala’s system of binary starts with one (four short syllables—binary “0000”—is the first pattern), the nth pattern corresponds to the binary representation of n-1, written backwards.

Positional use of zero in place of laghu matra dates from later centuries and would have been known to Halayudha but not to Pingala.

Most Vedic hymns are in stanzas of four quarters (paada), though there are some with three or five divisions. The most popular chandas have quarters that have 8, 11, or 12 syllables. The usual way to classify meters is by counting the number of syllables in each line.

Thus the gayatri consists of 8 syllables in 3 lines (8 x 3), anushtubh is 8 x 4, trishtubh and indravajra is 11 x 4, indravamsha is 12 x 4, vasantatilaka is 14 x 4, malini (the girl is 15 x 4 etc were used most frequently in the Vedic texts.

The syllables are prosodically either short (laghu) or long (guru). A laghu syllable is a short vowel followed by at most one consonant; any other syllable is a guru. Within each quarter verse, a sequence of laghus and gurus defines the chandas; this is much like the representation of a number by a succession of 0s and 1s used in the binary arithmetic of computers.

Pingala presented a method where all the binary laghu-guru sequences were shown as a matrix, prastara. Given a specific sequence, he showed how it could be converted into an equivalent decimal number; he also showed how a given decimal number could be expanded into the sequence of laghus and gurus. This suggests that an understanding of the basis of the representation of numbers existed.

Formation of Binomial Triangle (Pingala Triangle)

Pingala has given undue importance to the number 2 in formation of rules for framing Chandas.

He writes,

Any power of two throughout divisible by two is equal to two raised to the power of two representing the number of twos the first power is divisible by two.

The use of binary system has been explained in the context of prosody and in Vedic literature about the chanting of mantras with time scale. However, the mathematical significance has to be noted here. The Binomial triangle can rightly be called Pingala Triangle and the series Pingala series. Indian mathematicians have identified the series and arranged the numbers in the form of a pyramid, which they called as Meruprasthana and depicted as follows:

Chandahshastra (8.24-25) describes method of obtaining binary equivalent of any decimal number in detail.

These were used 1600 years before westerners/arabs copied binary system from India through trade and invasion.

We now use zero and one (0 and 1) in representing binary numbers.

Pingala also knew the special case of the binomial theorem for the index 2, i.e. for (a + b)2, as did his Greek contemporary Euclid..


“Indian Binary Numbers and the Katapayadi Notation.”Annals of the Bhandarkar Oriental Research Institute 81 (2000)

“Binary Numbers in Indian Antiquity.” In Computing Science in Ancient India, edited by T. R. Rao and S. Kak.

Dr Sindhu Prashanth