The Brahmi numerals are a numeral system attested from the 3rd century BCE (somewhat later in the case of most of the tens). They are the direct graphic ancestors of the modern Indian and Hindu–Arabic numerals. However, they were conceptually distinct from these later systems, as they were not used as a positional system with a zero. Rather, there were separate numerals for each of the tens (10, 20, 30, etc.). There were also symbols for 100 and 1000 which were combined in ligatures with the units to signify 200, 300, 2000, 3000, etc. In computers, these ligatures are written with the Brahmi Number Joiner at U+1107F.
The source of the first three numerals seems clear: they are collections of 1, 2, and 3 strokes, in Ashoka's era vertical I, II, III like Roman numerals, but soon becoming horizontal like the ancient Han Chinese numerals. In the oldest inscriptions, 4 looks like a +, reminiscent of the X of neighboring Kharoṣṭhī, and perhaps a representation of 4 lines or 4 directions. However, the other unit numerals appear to be arbitrary symbols in even the oldest inscriptions. It is sometimes supposed that they may also have come from collections of strokes, run together in cursive writing in a way similar to that attested in the development of Egyptian hieratic and demotic numerals, but this is not supported by any direct evidence. Likewise, the units for the tens are not obviously related to each other or to the units, although 10, 20, 80, 90 might be based on a circle.
The sometimes rather striking graphic similarity they have with the hieratic and demotic Egyptian numerals, while suggestive, is not prima facie evidence of an historical connection, as many cultures have independently recorded numbers as collections of strokes. With a similar writing instrument, the cursive forms of such groups of strokes could easily be broadly similar as well, and this is one of the primary hypotheses for the origin of Brahmi numerals.
Another possibility is that the numerals were acrophonic, like the Attic numerals, and based on the Kharoṣṭhī alphabet. For instance, 4 "chatur" early on took a shape much like the Kharosthi letter 𐨖 "ch", while 5 "pancha" looks remarkably like Kharosthi 𐨤 "p"; and so on through 6 "ssat" and 𐨮, then 7 "sapta" and 𐨯, and finally 9 nava and 𐨣. However, there are problems of timing and lack of records. The full set of numerals is not attested until the 1st-2nd century CE, 400 years after Ashoka. Assertions that either the numerals derive from tallies or that they are alphabetic are, at best, educated guesses.