Title: Abacus
Content:   The abacus (plural abaci or abacuses), also called a counting frame, is a calculating tool which has been used since ancient times. It was used in the ancient Near East, Europe, China, and Russia, centuries before the adoption of the Arabic numeral system. The exact origin of the abacus has not yet emerged. It consists of rows of movable beads, or similar objects, strung on a wire. They represent digits. One of the two numbers is set up, and the beads are manipulated to perform an operation such as addition, or even a square or cubic root. In their earliest designs, the rows of beads could be loose on a flat surface or sliding in grooves. Later the beads were made to slide on rods and built into a frame, allowing faster manipulation. Abacuses are still made, often as a bamboo frame with beads sliding on wires. In the 
Title: Abacus
Content:   The earliest known written documentation of the Chinese abacus dates to the 2nd century BC. The Chinese abacus, also known as the suanpan (算盤/算盘, lit. "calculating tray"), is typically 20 cm tall and comes in various widths, depending on the operator. It usually has more than seven rods. There are two beads on each rod in the upper deck and five beads each in the bottom one. The beads are usually rounded and made of hardwood. The beads are counted by moving them up or down towards the beam; beads moved toward the beam are counted, while those moved away from it are 
Title: Abacus
Content:  At around 600 BC, Persians first began to use the abacus, during the Achaemenid Empire. Under the Parthian, Sassanian, and Iranian empires, scholars concentrated on exchanging knowledge and inventions with the countries around them – India, China, and the Roman Empire- which is how the abacus may have been exported to other countries.
Title: Abacus
Content:  The Sumerian abacus appeared between 2700–2300 BC. It held a table of successive columns which delimited the successive orders of magnitude of their sexagesimal (base 60) number system. Some scholars point to a character in Babylonian cuneiform that may have been derived from a representation of the abacus. It is the belief of Old Babylonian scholars, such as Ettore Carruccio, that Old Babylonians "may have used the abacus for the operations of addition and subtraction; however, this primitive device proved difficult to use for more complex calculations".
Title: Abacus
Content:  One of the top beads is 5, while one of the bottom beads is 1. Each rod has a number under it, showing the place value. The suanpan can be reset to the starting position instantly by a quick movement along the horizontal axis to spin all the beads away from the horizontal beam at the center. The prototype of the Chinese abacus appeared during the Han Dynasty, and the beads are oval. The Song Dynasty and earlier used the 1:4 type or four-beads abacus similar to the modern abacus including the shape of the beads commonly known as Japanese-style abacus. In 
Title: Abacus
Content:  for traditional Chinese measures of weight. (Instead of running on wires as in the Chinese, Korean, and Japanese models, the Roman model used grooves, presumably making arithmetic calculations much slower.) Another possible source of the suanpan is Chinese counting rods, which operated with a decimal system but lacked the concept of zero as a placeholder. The zero was probably introduced to the Chinese in the Tang dynasty (618–907) when travel in the Indian Ocean and the Middle East would have provided direct contact with India, allowing them to acquire the concept of zero and the decimal point from Indian merchants and mathematicians.
Title: History of computing
Content:  This was the first known calculator and most advanced system of calculation known to date - preceding Archimedes by 2,000 years. In c. 1050–771 BC, the south-pointing chariot was invented in ancient China. It was the first known geared mechanism to use a differential gear, which was later used in analog computers. The Chinese also invented a more sophisticated abacus from around the 2nd century BC known as the Chinese abacus. In the 5th century BC in ancient India, the grammarian Pāṇini formulated the grammar of Sanskrit in 3959 rules known as the Ashtadhyayi which was highly systematized and technical. Panini used metarules, transformations and recursions. In 
Title: Abacus
Content:  In Japan, the abacus is called soroban (算盤, そろばん, lit. "counting tray"). It was imported from China in the 14th century. It was probably in use by the working class a century or more before the ruling class adopted it, as the class structure obstructed such changes. The 1:4 abacus, which removes the seldom-used second and fifth bead became popular in the 1940s. Today's Japanese abacus is a 1:4 type, four-bead abacus, introduced from China in the Muromachi era. It adopts the form of the upper deck one bead and the bottom four beads. The top bead on the upper deck was equal to 
Title: Chinese mathematics
Content:  the Nine Chapters on the Mathematical Art, he omitted Tian yuan shu and the increase multiply method. Instead, mathematical progress became focused on computational tools. In 15 century, abacus came into its suan pan form. Easy to use and carry, both fast and accurate, it rapidly overtook rod calculus as the preferred form of computation. Zhusuan, the arithmetic calculation through abacus, inspired multiple new works. Suanfa Tongzong (General Source of Computational Methods), a 17-volume work published in 1592 by Cheng Dawei, remained in use for over 300 years. Zhu Zaiyu, Prince of Zheng used 81 position abacus to calculate the square root and cubic root of 2 
Title: Abacus
Content:  early Ming Dynasty, the abacus began to appear in a 1:5 ratio. The upper deck had one bead and the bottom had five beads. In the late Ming Dynasty, the abacus styles appeared in a 2:5 ratio. The upper deck had two beads, and the bottom had five. Various calculation techniques were devised for Suanpan enabling efficient calculations. Some schools teach students how to use it. In the long scroll Along the River During the Qingming Festival painted by Zhang Zeduan during the Song dynasty (960–1297), a suanpan is clearly visible beside an account book and doctor's prescriptions on the counter of 

Question: when was the abacus invented in ancient china?
Answer: 2nd century BC.