From Nothing to Everything: Zero in Modern Computing
How an ancient Indian concept powers every digital device
Explore how zero and binary logic, which have roots in Piṅgala's 200 BCE Chandaḥsūtra, form the foundation of all modern computing and digital technology.
The Grammarian Counting Poems
Some time in the 2nd century BCE, in a Sanskrit grammar school in north India, a teacher named Piṅgala sat with a stack of palm leaves and began to enumerate every possible rhythm of a Sanskrit verse. The rules were simple. A syllable was either laghu (light, short) or guru (heavy, long). Two states. Nothing in between. A foot of three syllables could therefore be any of eight combinations. A foot of four yielded sixteen. A foot of six, sixty-four. The numbers ran upward by powers of two faster than he could write them.

Piṅgala was not building a counting machine. He was trying to systematise the metres of his sacred poetry. But in the Chandaḥsūtra he wrote, he set down rules so terse and operational that a 21st-century engineer reading them recognises immediately what they are. Replace every laghu with 1 and every guru with 0, and Piṅgala's tables map directly onto modern binary numerals. His sūtras are telegraphic:
रूपे शून्यम्। द्विः शून्ये। तावदर्धे तद् गुणितम्।
rūpe śūnyam. dviḥ śūnye. tāvad ardhe tad guṇitam.
When it is one, write a zero. When the remainder is zero, double the result. When halving, square the partial result.
Chandaḥsūtra, c. 200 BCE
Twenty-two centuries before binary computing, a Sanskrit scholar wrote what is, operationally, a compact binary arithmetic routine.
The Computer in Your Pocket Remembers Bharat
Right now, between you and these words, there are roughly fifteen billion tiny electrical switches. Each one is either on or off, conducting or blocking, one or zero. Multiplied, patterned, and sequenced, these switches encode every character of this sentence, every photo in your gallery, every face on every video call you have ever taken. Modern computing is a cathedral built entirely out of two states: śūnya and eka. Zero and one.
Ask a standard history book where that binary cathedral came from and you will hear about Gottfried Leibniz in 1703, George Boole in 1854, and Claude Shannon in 1937. Each of those stories is true. None of them is the beginning. The beginning was the grammarian on the palm leaves.
The Meru of Combinations

Around 950 CE, Halāyudha wrote a commentary on Piṅgala called the Mṛtasañjīvanī. To help readers count how many metrical patterns contained, say, exactly two laghus out of four, he drew a triangular diagram he called Meru-prastāra, the Expansion of Mount Meru. Each row listed the binomial coefficients for a given n. In Western mathematics the same diagram is called Pascal's Triangle, named after Blaise Pascal who described it in 1653. Halāyudha's version precedes Pascal by about seven hundred years. The combinatorics behind every modern error-correcting code, every cryptographic hash, every compression algorithm sits inside that triangle.
Piṅgala and Halāyudha were not dabbling in a side project. They were doing computer science before there were computers.
From the Chandaḥsūtra to Shannon
The transmission route is long but traceable. Arab mathematicians absorbed Indian combinatorics along with the decimal system during the 8th and 9th centuries. European thinkers received both streams from the 12th century onward. Leibniz, who formalised binary arithmetic in a 1703 paper, openly praised patterns he saw echoed in the Chinese I Ching hexagrams and in the broader Eastern combinatorial tradition that descended from Indian sources. Boole's 1854 Laws of Thought turned binary into a logic. Then, in 1937, a twenty-one year old graduate student at MIT named Claude Shannon submitted a master's thesis that would later be called the most important master's thesis of the 20th century. Its title: A Symbolic Analysis of Relay and Switching Circuits. Shannon proved that electrical switches, arranged correctly, could perform Boolean logic. Zero and one could now compute anything computable.
Every CPU, every memory cell, every graphics card since then has been an industrial realisation of Shannon's insight. And Shannon's insight is an industrial realisation of Boole's logic. And Boole's logic is a formalisation of Leibniz's binary. And Leibniz's binary is a rediscovery of Piṅgala. The chain is long. The first link is Bhāratīya.
The Four Zeros of Computing
Modern computing depends on zero not once but four times:
- The binary digit. Every bit that flows through a chip is either zero or one. Without a stable concept of nothing, there is no binary.
- Place value. Memory addresses, file offsets, array indices all use positional notation inherited from Brahmagupta's 628 CE rules in the Brāhmasphuṭasiddhānta. A memory slot at address 0 is not the same as an uninitialised slot, and that distinction requires the grammar of zero that Brahmagupta first codified.
- The null state. Databases, programming languages, and network protocols all rely on a formal concept of absence. A
NULLin a database row means 'no value here', which is conceptually identical to śūnya as placeholder rather than quantity. - The zero vector. Machine learning models, graph algorithms, and search engines like Google's PageRank begin their iterations from a vector of zeros and converge toward an answer. Computation bootstraps itself out of nothing.
What's Preserved and What's Still Waiting
Modern computing has carried the operational insight forward with astonishing fidelity. A smartphone today performs roughly a trillion binary operations per second, every one of them consistent with Piṅgala's rules and Brahmagupta's arithmetic. What has not yet been carried forward is the philosophical context.
In the Bhāratīya tradition, śūnya was never only a number. It was the ground out of which all form arises, the pregnant emptiness that the Mahāyāna sūtras describe as śūnyatā, the same intuition that let Piṅgala see that absence could encode presence. Computing takes the mechanics and leaves the contemplation. The next frontier, perhaps the one quantum computing is quietly opening, is what happens when the philosophical dimension is re-integrated. Superposition, entanglement, and the collapse of possibility into a single observed bit are strangely close to the classical Indian vocabulary of māyā and darśana.
For now, it is enough to notice this. The device in your hand is a descendant of a palm-leaf classroom. Piṅgala set down a single line, rūpe śūnyam, when it is one, write a zero. Twenty-two centuries later, every screen that lights up in your pocket is doing exactly what he said. The next time it does, remember who first saw that nothing could contain everything.
Key figures
Piṅgala
Author of the Chandaḥsūtra, the foundational text on Sanskrit prosody. In eight chapters of terse aphorisms, Piṅgala solved the combinatorial problem of enumerating all metrical patterns and, in doing so, laid down the earliest known algorithms for binary representation, binomial coefficients, and efficient exponentiation.
The Chandaḥsūtra survives intact and is still studied today. Its algorithms for binary encoding, combinatorial counting, and exponentiation are acknowledged in modern computer science as early instances of concepts that would not be rediscovered in the West until the seventeenth through twentieth centuries.
Halāyudha
Sanskrit grammarian and commentator whose Mṛtasañjīvanī, a commentary on Piṅgala's Chandaḥsūtra, preserved the original sūtras and extended them with new combinatorial diagrams. His description of the meru-prastāra, a triangle of binomial coefficients, predates Blaise Pascal's version by about seven centuries.
The Mṛtasañjīvanī is still the standard commentary on Piṅgala and is printed alongside the Chandaḥsūtra in modern editions. Halāyudha's meru-prastāra is cited in most serious histories of mathematics as the earliest known form of Pascal's Triangle.
Claude Shannon
American mathematician and electrical engineer, widely regarded as the father of information theory. His 1937 MIT master's thesis, A Symbolic Analysis of Relay and Switching Circuits, proved that Boolean algebra, itself a formalization of binary logic, could be implemented in physical switches. That single insight made modern digital computing possible.
Shannon's 1937 thesis has been called the most important master's thesis of the twentieth century. His 1948 paper A Mathematical Theory of Communication founded information theory and introduced the term 'bit.' The bit is, in the most literal sense, the direct descendant of Piṅgala's Laghu-Guru distinction, via more than two thousand years of intellectual transmission.
Case studies
Piṅgala to Shannon: A Twenty-Two Century Handshake
Around 200 BCE in Bharat, Piṅgala writes the Chandaḥsūtra. In eight chapters of terse Sanskrit sūtras, he enumerates every possible Sanskrit metrical pattern by encoding syllables as binary sequences, and gives algorithms to translate between binary sequences and ordinal numbers. Around 950 CE, Halāyudha's commentary extends this with the meru-prastāra, a triangle of binomial coefficients. Between the eighth and twelfth centuries, Arab mathematicians carry Indian combinatorics and decimal arithmetic into the Islamic world. In 1703, Gottfried Leibniz publishes his formal paper on binary arithmetic, citing non-European sources. In 1854, George Boole publishes The Laws of Thought, turning binary into a logical calculus. In 1937, a twenty-one year old Claude Shannon submits a master's thesis at MIT proving that Boolean logic can be physically realized by electrical switches. That thesis is the immediate ancestor of every digital computer ever built.
The Chandaḥsūtra 8.28-30 sūtras, 'dvir ardhe, rūpe śūnyam, tāvad ardhe tad guṇitam,' are doing what a modern CPU does. They are binary conversion routines. The algorithm Piṅgala describes for computing 2 to the power of n through repeated squaring is still in use today in RSA cryptography, where it is called 'exponentiation by squaring.' The meru-prastāra of Halāyudha is exactly the Pascal's Triangle behind every binomial distribution, every error-correcting code, every Reed-Solomon code on every DVD and every satellite downlink. The intellectual lineage is unbroken.
A modern smartphone performs roughly a trillion binary operations per second. Every one of those operations obeys the rules Piṅgala wrote down. The global semiconductor industry is valued at over six hundred billion dollars annually, and the software industry built on top of it at several trillion dollars. All of it is downstream of a Sanskrit classroom.
Insights that look pure and abstract can echo across millennia and reshape entire civilizations. Piṅgala was trying to count poems. He ended up defining the skeleton of modern computing. When you do rigorous work on fundamentals, you cannot know which century will eventually need it.
Halāyudha's meru-prastāra predates Blaise Pascal's 1653 description of the same triangle by roughly seven hundred years.
Ariane 5 Flight 501: When One Misread Zero Destroyed a Rocket
On 4 June 1996, the European Space Agency launched the maiden flight of Ariane 5, a rocket ten years and seven billion dollars in the making. Thirty-seven seconds into flight, the rocket veered off course, automatically self-destructed, and rained burning debris over the swamps of French Guiana. The four scientific satellites on board, worth roughly five hundred million dollars, were lost. The cause was not a hardware failure, a weather event, or a manufacturing defect. It was a single arithmetic error. A piece of inertial reference software, originally written for the slower Ariane 4, tried to convert a 64-bit floating point number representing horizontal velocity into a 16-bit signed integer. On Ariane 5's higher acceleration profile, the velocity number grew larger than the 16-bit container could hold. The conversion threw an overflow exception, the backup inertial unit failed the same way a few hundred milliseconds later, and the rocket's guidance computer interpreted the resulting diagnostic data as real flight data and commanded a catastrophic course correction.
Bhāskara II in the twelfth century Līlāvatī was remarkably careful about the handling of zero, overflow, and division by zero. He coined the term kha-hara for quantities divided by zero and insisted that such quantities must be tracked carefully through every subsequent operation. Ariane 5's software did not honor that discipline. It allowed a quantity to grow past the bounds of its container without a graceful fallback. The classical Indian insistence on treating śūnya and anantya as first-class mathematical objects, each demanding explicit handling, is the same discipline modern numerical computing now enforces through IEEE 754 floating point exceptions and defensive integer range checks.
The loss triggered a full redesign of European launch software standards. A thirty-six hour review board, led by Jacques-Louis Lions, concluded that the overflow could have been prevented by a single range check. Ariane 5 eventually became one of the most reliable launchers in history, flying more than one hundred successful missions. But the 1996 failure is still taught in every serious software engineering course as a reminder of what a mishandled boundary between number systems can cost.
Every zero, every overflow, every conversion between number systems matters. A 64-bit float that does not fit into a 16-bit integer is exactly the kind of hidden boundary Bhāskara II warned about eight centuries earlier. When software respects the full arithmetic of the void, it does not blow up.
The Ariane 5 Flight 501 failure destroyed approximately 370 million dollars of hardware and payload. A single range check, perhaps a dozen characters of code, would have prevented it.
Google PageRank: Bootstrapping the World's Knowledge From a Vector of Zeros
In 1996, two Stanford graduate students named Larry Page and Sergey Brin began a project originally called BackRub. They wanted to rank the importance of every web page on the public internet using a novel idea. A page is important if other important pages link to it. The circularity is resolved mathematically by treating the entire web as a giant matrix and computing its dominant eigenvector iteratively. The algorithm, which they called PageRank, begins every computation from a uniform vector of zeros (or, equivalently, a uniform 1 over N distribution, which is a constant offset from zero). It then repeatedly multiplies this starting vector by the web's link matrix, converging over a few dozen iterations to a stable ranking that reflects the global structure of the web's link graph. They published the algorithm in 1998, founded Google, and within a decade had built the most valuable information company in human history.
This is śūnyatā in matrix form. The PageRank algorithm takes an empty state, a vector that carries no information, and, through pure iteration over the link structure of the web, produces a complete ranking of all the world's knowledge. The starting point contains none of the answer. The answer emerges entirely from the relationships between nodes. This mirrors the Mahāyāna insight that form arises from the pregnant emptiness of śūnyatā, not from any prior substance. The PageRank eigenvector is the web's self-portrait, drawn out of zero by the same kind of recursive unfolding that Piṅgala used to enumerate all possible meters from the single binary distinction of Laghu and Guru.
PageRank became the core ranking signal behind Google Search. Google, founded in 1998, grew into a company worth over one and a half trillion dollars by 2024. PageRank-style algorithms now underlie recommendation systems, social network analysis, fraud detection, and modern graph neural networks. All of them begin computation from zero and iterate their way to meaning.
Great computing, like great philosophy, starts from nothing. The habit of initializing a problem with a vector of zeros and letting structure emerge through iteration is the engineering form of an ancient Indian insight about the generative power of śūnya. When you are stuck on a hard problem, start from zero and let the structure speak.
By 2024, Google processed more than 8.5 billion searches per day, each of which is, at some level, a descendant of a zero vector and a Piṅgala style recursion.
Historical context
From Piṅgala's Chandaḥsūtra (c. 200 BCE) to the digital present
Living traditions
Every computer, smartphone, and embedded system on earth runs on binary arithmetic, place value notation, and the formal rules for zero that Bharat gave the world. India's modern information technology industry, worth over 245 billion dollars in exports in 2024, employs more than five million people and powers a significant share of the global digital economy. The lineage from Piṅgala's classroom to Bengaluru's tech parks is direct. Research groups at the Indian Institute of Science, the Indian Institutes of Technology, TIFR, ISI Kolkata, and C-DAC continue to contribute to theoretical computer science, quantum computing, and artificial intelligence research that, consciously or not, stands on the shoulders of twenty-two centuries of Indian thought about śūnya and combinatorial structure.
- Visvesvaraya Industrial and Technological Museum, Bengaluru: India's flagship science and technology museum houses the Space Gallery and BiotechRevolution Gallery, and features exhibits tracing the history of computation from ancient Indian mathematics through modern Indian computing achievements. It is one of the few museums in the world where the path from Piṅgala's Chandaḥsūtra to modern microprocessors is explicitly curated.
- Centre for Development of Advanced Computing (C-DAC), Pune: C-DAC built the PARAM series of indigenous supercomputers starting in 1991, when India was denied access to Western supercomputers. The PARAM Siddhi-AI, launched in 2020, is among the world's top twenty most powerful AI supercomputers. C-DAC's work is the modern, silicon chapter of the lineage that began with Piṅgala.
Reflection
- Think about the last five minutes of your day. How many different devices, apps, and services did you touch, each silently performing billions of binary operations on your behalf? Does knowing that every one of those operations is a distant descendant of Piṅgala's Chandaḥsūtra change anything about how you experience your own technology?
- Modern computing begins every major algorithm with a vector of zeros. Machine learning models start from zero weights. Search engines start from a zero ranking. Databases start from empty tables. Why do you think 'start from nothing' has become the universal engineering pattern? What does that tell you about the generative power of śūnya?
- Piṅgala was counting Sanskrit meters. He had no idea his work would one day power every computer on earth. What are the deep, seemingly useless activities in Bharat today that might echo forward two thousand years in ways we cannot currently imagine? And how should that possibility change the way we decide what is worth studying?